r63895 - in /branches/upstream/libstring-formatter-perl/current: Changes MANIFEST META.json META.yml Makefile.PL README dist.ini lib/String/Formatter.pm lib/String/Formatter/Cookbook.pm notes.txt
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Sun Oct 17 23:15:02 UTC 2010
Author: ansgar
Date: Sun Oct 17 23:14:35 2010
New Revision: 63895
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63895
Log:
[svn-upgrade] new version libstring-formatter-perl (0.102081)
Removed:
branches/upstream/libstring-formatter-perl/current/notes.txt
Modified:
branches/upstream/libstring-formatter-perl/current/Changes
branches/upstream/libstring-formatter-perl/current/MANIFEST
branches/upstream/libstring-formatter-perl/current/META.json
branches/upstream/libstring-formatter-perl/current/META.yml
branches/upstream/libstring-formatter-perl/current/Makefile.PL
branches/upstream/libstring-formatter-perl/current/README
branches/upstream/libstring-formatter-perl/current/dist.ini
branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm
branches/upstream/libstring-formatter-perl/current/lib/String/Formatter/Cookbook.pm
Modified: branches/upstream/libstring-formatter-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/Changes?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/Changes (original)
+++ branches/upstream/libstring-formatter-perl/current/Changes Sun Oct 17 23:14:35 2010
@@ -1,4 +1,9 @@
Revision history for String-Formatter
+
+0.102081 2010-10-17 13:40:26 America/New_York
+ allow subclasses to provide default_codes
+
+ implement %% in a simpler, but not quite perl-like, way
0.102080 2010-07-27 22:07:11 America/New_York
input hunkers have been tweaked and more fully documented
Modified: branches/upstream/libstring-formatter-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/MANIFEST?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/MANIFEST (original)
+++ branches/upstream/libstring-formatter-perl/current/MANIFEST Sun Oct 17 23:14:35 2010
@@ -9,7 +9,6 @@
dist.ini
lib/String/Formatter.pm
lib/String/Formatter/Cookbook.pm
-notes.txt
t/basic.t
t/braces.t
t/method.t
Modified: branches/upstream/libstring-formatter-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/META.json?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/META.json (original)
+++ branches/upstream/libstring-formatter-perl/current/META.json Sun Oct 17 23:14:35 2010
@@ -5,7 +5,7 @@
"Darren Chamberlain <darren at cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670",
+ "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.102400",
"license" : [
"gpl_2"
],
@@ -40,174 +40,163 @@
"url" : "git://git.codesimply.com/String-Formatter.git"
}
},
- "version" : "0.102080",
+ "version" : "0.102081",
"x_Dist_Zilla" : {
"plugins" : [
{
- "class" : "Dist::Zilla::Plugin::Prereq",
- "config" : {
- "Dist::Zilla::Plugin::Prereqs" : {
- "phase" : "runtime",
- "type" : "requires"
- }
- },
- "name" : "Prereq",
- "version" : "4.101900"
- },
- {
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "4.101900"
- },
- {
- "class" : "Dist::Zilla::Plugin::AutoPrereq",
- "name" : "@RJBS/AutoPrereq",
- "version" : "4.101900"
- },
- {
- "class" : "Dist::Zilla::Plugin::AutoVersion",
- "name" : "@RJBS/AutoVersion",
- "version" : "4.101900"
+ "version" : "4.102342"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::AutoPrereqs",
+ "name" : "@RJBS/AutoPrereqs",
+ "version" : "4.102342"
+ },
+ {
+ "class" : "Dist::Zilla::Plugin::Git::NextVersion",
+ "name" : "@RJBS/Git::NextVersion",
+ "version" : "1.102810"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
"name" : "@RJBS/Repository",
- "version" : "0.13"
+ "version" : "0.14"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"name" : "@RJBS/PodWeaver",
- "version" : "3.101640"
+ "version" : "3.101641"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@RJBS/@Git/Check",
- "version" : "1.102040"
+ "version" : "1.102810"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@RJBS/@Git/Commit",
- "version" : "1.102040"
+ "version" : "1.102810"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@RJBS/@Git/Tag",
- "version" : "1.102040"
+ "version" : "1.102810"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@RJBS/@Git/Push",
- "version" : "1.102040"
+ "version" : "1.102810"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.101900"
+ "version" : "4.102342"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.101900"
+ "version" : "4.102342"
}
],
"zilla" : {
@@ -215,7 +204,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "4.101900"
+ "version" : "4.102342"
}
}
}
Modified: branches/upstream/libstring-formatter-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/META.yml?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/META.yml (original)
+++ branches/upstream/libstring-formatter-perl/current/META.yml Sun Oct 17 23:14:35 2010
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670'
+generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.102400'
license: gpl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,143 +20,135 @@
perl: 5.006
resources:
repository: git://git.codesimply.com/String-Formatter.git
-version: 0.102080
+version: 0.102081
x_Dist_Zilla:
plugins:
-
- class: Dist::Zilla::Plugin::Prereq
- config:
- Dist::Zilla::Plugin::Prereqs:
- phase: runtime
- type: requires
- name: Prereq
- version: 4.101900
- -
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 4.101900
+ version: 4.102342
-
- class: Dist::Zilla::Plugin::AutoPrereq
- name: '@RJBS/AutoPrereq'
- version: 4.101900
+ class: Dist::Zilla::Plugin::AutoPrereqs
+ name: '@RJBS/AutoPrereqs'
+ version: 4.102342
-
- class: Dist::Zilla::Plugin::AutoVersion
- name: '@RJBS/AutoVersion'
- version: 4.101900
+ class: Dist::Zilla::Plugin::Git::NextVersion
+ name: '@RJBS/Git::NextVersion'
+ version: 1.102810
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
- version: 0.13
+ version: 0.14
-
class: Dist::Zilla::Plugin::PodWeaver
name: '@RJBS/PodWeaver'
- version: 3.101640
+ version: 3.101641
-
class: Dist::Zilla::Plugin::Git::Check
name: '@RJBS/@Git/Check'
- version: 1.102040
+ version: 1.102810
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@RJBS/@Git/Commit'
- version: 1.102040
+ version: 1.102810
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@RJBS/@Git/Tag'
- version: 1.102040
+ version: 1.102810
-
class: Dist::Zilla::Plugin::Git::Push
name: '@RJBS/@Git/Push'
- version: 1.102040
+ version: 1.102810
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.101900
+ version: 4.102342
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.101900
+ version: 4.102342
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.101900
+ version: 4.102342
Modified: branches/upstream/libstring-formatter-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/Makefile.PL?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/Makefile.PL (original)
+++ branches/upstream/libstring-formatter-perl/current/Makefile.PL Sun Oct 17 23:14:35 2010
@@ -25,7 +25,7 @@
'Params::Util' => '0',
'Sub::Exporter' => '0'
},
- 'VERSION' => '0.102080',
+ 'VERSION' => '0.102081',
'test' => {
'TESTS' => 't/*.t'
}
Modified: branches/upstream/libstring-formatter-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/README?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/README (original)
+++ branches/upstream/libstring-formatter-perl/current/README Sun Oct 17 23:14:35 2010
@@ -1,7 +1,7 @@
This archive contains the distribution String-Formatter,
-version 0.102080:
+version 0.102081:
build sprintf-like functions of your own
Modified: branches/upstream/libstring-formatter-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/dist.ini?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/dist.ini (original)
+++ branches/upstream/libstring-formatter-perl/current/dist.ini Sun Oct 17 23:14:35 2010
@@ -4,8 +4,4 @@
license = GPL_2 ; inherited this from darren at cpan
copyright_holder = Ricardo Signes <rjbs at cpan.org>
-[Prereq]
-Params::Util = 0
-Sub::Exporter = 0
-
[@RJBS]
Modified: branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm (original)
+++ branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm Sun Oct 17 23:14:35 2010
@@ -2,7 +2,7 @@
use warnings;
package String::Formatter;
BEGIN {
- $String::Formatter::VERSION = '0.102080';
+ $String::Formatter::VERSION = '0.102081';
}
# ABSTRACT: build sprintf-like functions of your own
@@ -55,7 +55,7 @@
string_replacer => 'positional_replace',
hunk_formatter => 'format_simply',
);
-
+
no strict 'refs';
for my $method (keys %METHODS) {
*$method = sub { $_[0]->{ $method } };
@@ -66,10 +66,19 @@
}
+sub default_codes {
+ return {};
+}
+
sub new {
my ($class, $arg) = @_;
- my $self = bless { codes => $arg->{codes} } => $class;
+ my $_codes = {
+ %{ $class->default_codes },
+ %{ $arg->{codes} || {} },
+ };
+
+ my $self = bless { codes => $_codes } => $class;
for (keys %METHODS) {
$self->{ $_ } = $arg->{ $_ } || do {
@@ -81,9 +90,6 @@
}
my $codes = $self->codes;
-
- Carp::confess("you must not supply a % format") if defined $codes->{'%'};
- $codes->{'%'} = '%';
return $self;
}
@@ -143,6 +149,8 @@
conversion => $7,
};
+ $to_fmt[-1] = '%' if $to_fmt[-1]{literal} eq '%%';
+
$pos = pos $string;
}
@@ -199,7 +207,7 @@
sub __closure_replace {
my ($closure) = @_;
-
+
return sub {
my ($self, $hunks, $input) = @_;
@@ -227,6 +235,7 @@
};
}
+# $self->$string_replacer($hunks, $input);
BEGIN {
*positional_replace = __closure_replace(sub {
my ($self, $arg) = @_;
@@ -300,7 +309,7 @@
=head1 VERSION
-version 0.102080
+version 0.102081
=head1 WARNING
@@ -553,6 +562,19 @@
Even things like C<2$> and C<*> are probably not going to appear in
String::Formatter's default behavior.
+Another subtle difference, introduced intentionally, is in the handling of
+C<%%>. With the default String::Formatter behavior, string C<%%> is not
+interpreted as a formatting code. This is different from the behavior of
+Perl's C<sprintf>, which interprets it as a special formatting character that
+doesn't consume input and always acts like the fixed string C<%>. The upshot
+of this is:
+
+ sprintf "%%"; # ==> returns "%"
+ stringf "%%"; # ==> returns "%%"
+
+ sprintf "%10%"; # ==> returns " %"
+ stringf "%10%"; # ==> dies: unknown format code %
+
=for Pod::Coverage codes
default_format_hunker
default_input_processor
Modified: branches/upstream/libstring-formatter-perl/current/lib/String/Formatter/Cookbook.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libstring-formatter-perl/current/lib/String/Formatter/Cookbook.pm?rev=63895&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/lib/String/Formatter/Cookbook.pm (original)
+++ branches/upstream/libstring-formatter-perl/current/lib/String/Formatter/Cookbook.pm Sun Oct 17 23:14:35 2010
@@ -2,7 +2,7 @@
use warnings;
package String::Formatter::Cookbook;
BEGIN {
- $String::Formatter::Cookbook::VERSION = '0.102080';
+ $String::Formatter::Cookbook::VERSION = '0.102081';
}
# ABSTRACT: ways to put String::Formatter to use
1;
@@ -17,7 +17,7 @@
=head1 VERSION
-version 0.102080
+version 0.102081
=head1 OVERVIEW
More information about the Pkg-perl-cvs-commits
mailing list