r60809 - in /branches/upstream/libstring-formatter-perl/current: Changes META.json META.yml Makefile.PL README lib/String/Formatter.pm lib/String/Formatter/Cookbook.pm
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Thu Jul 29 05:26:05 UTC 2010
Author: carnil-guest
Date: Thu Jul 29 05:25:56 2010
New Revision: 60809
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=60809
Log:
[svn-upgrade] new version libstring-formatter-perl (0.102080)
Modified:
branches/upstream/libstring-formatter-perl/current/Changes
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/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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/Changes (original)
+++ branches/upstream/libstring-formatter-perl/current/Changes Thu Jul 29 05:25:56 2010
@@ -1,4 +1,7 @@
Revision history for String-Formatter
+
+0.102080 2010-07-27 22:07:11 America/New_York
+ input hunkers have been tweaked and more fully documented
0.101620 2010-06-11 21:31:26 America/New_York
add indexed_replace, require_arrayref_input, and indexed_stringf
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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/META.json (original)
+++ branches/upstream/libstring-formatter-perl/current/META.json Thu Jul 29 05:25:56 2010
@@ -5,7 +5,7 @@
"Darren Chamberlain <darren at cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.101620, CPAN::Meta::Converter version 2.101600",
+ "generated_by" : "Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670",
"license" : [
"gpl_2"
],
@@ -40,124 +40,124 @@
"url" : "git://git.codesimply.com/String-Formatter.git"
}
},
- "version" : "0.101620",
+ "version" : "0.102080",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Prereq",
"config" : {
- "Dist::Zilla::Plugin::Prereq" : {
+ "Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "requires"
}
},
"name" : "Prereq",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereq",
"name" : "@RJBS/AutoPrereq",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::AutoVersion",
"name" : "@RJBS/AutoVersion",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
@@ -167,55 +167,55 @@
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"name" : "@RJBS/PodWeaver",
- "version" : "3.101620"
+ "version" : "3.101640"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@RJBS/@Git/Check",
- "version" : "1.101330"
+ "version" : "1.102040"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@RJBS/@Git/Commit",
- "version" : "1.101330"
+ "version" : "1.102040"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@RJBS/@Git/Tag",
- "version" : "1.101330"
+ "version" : "1.102040"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@RJBS/@Git/Push",
- "version" : "1.101330"
+ "version" : "1.102040"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.101620"
+ "version" : "4.101900"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.101620"
+ "version" : "4.101900"
}
],
"zilla" : {
- "class" : "Dist::Zilla",
+ "class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
- "version" : "4.101620"
+ "version" : "4.101900"
}
}
}
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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/META.yml (original)
+++ branches/upstream/libstring-formatter-perl/current/META.yml Thu Jul 29 05:25:56 2010
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.101620, CPAN::Meta::Converter version 2.101600'
+generated_by: 'Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670'
license: gpl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,101 +20,101 @@
perl: 5.006
resources:
repository: git://git.codesimply.com/String-Formatter.git
-version: 0.101620
+version: 0.102080
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::Prereq
config:
- Dist::Zilla::Plugin::Prereq:
+ Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: requires
name: Prereq
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::AutoPrereq
name: '@RJBS/AutoPrereq'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::AutoVersion
name: '@RJBS/AutoVersion'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
@@ -122,41 +122,41 @@
-
class: Dist::Zilla::Plugin::PodWeaver
name: '@RJBS/PodWeaver'
- version: 3.101620
+ version: 3.101640
-
class: Dist::Zilla::Plugin::Git::Check
name: '@RJBS/@Git/Check'
- version: 1.101330
+ version: 1.102040
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@RJBS/@Git/Commit'
- version: 1.101330
+ version: 1.102040
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@RJBS/@Git/Tag'
- version: 1.101330
+ version: 1.102040
-
class: Dist::Zilla::Plugin::Git::Push
name: '@RJBS/@Git/Push'
- version: 1.101330
+ version: 1.102040
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.101620
+ version: 4.101900
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.101620
+ version: 4.101900
zilla:
- class: Dist::Zilla
+ class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.101620
+ version: 4.101900
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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/Makefile.PL (original)
+++ branches/upstream/libstring-formatter-perl/current/Makefile.PL Thu Jul 29 05:25:56 2010
@@ -2,7 +2,7 @@
use strict;
use warnings;
- BEGIN { require 5.006; }
+BEGIN { require 5.006; }
use ExtUtils::MakeMaker 6.31;
@@ -25,7 +25,7 @@
'Params::Util' => '0',
'Sub::Exporter' => '0'
},
- 'VERSION' => '0.101620',
+ 'VERSION' => '0.102080',
'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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/README (original)
+++ branches/upstream/libstring-formatter-perl/current/README Thu Jul 29 05:25:56 2010
@@ -1,7 +1,7 @@
This archive contains the distribution String-Formatter,
-version 0.101620:
+version 0.102080:
build sprintf-like functions of your own
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=60809&op=diff
==============================================================================
--- branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm (original)
+++ branches/upstream/libstring-formatter-perl/current/lib/String/Formatter.pm Thu Jul 29 05:25:56 2010
@@ -2,7 +2,7 @@
use warnings;
package String::Formatter;
BEGIN {
- $String::Formatter::VERSION = '0.101620';
+ $String::Formatter::VERSION = '0.102080';
}
# ABSTRACT: build sprintf-like functions of your own
@@ -134,12 +134,13 @@
while ($string =~ m{\G(.*?)$regex}gs) {
push @to_fmt, $1, {
- orig => $2,
alignment => $3,
min_width => $4,
max_width => $5,
- passme => $6,
- formchar => $7,
+
+ literal => $2,
+ argument => $6,
+ conversion => $7,
};
$pos = pos $string;
@@ -207,9 +208,9 @@
for my $i (grep { ref $hunks->[$_] } 0 .. $#$hunks) {
my $hunk = $hunks->[ $i ];
- my $conv = $code->{ $hunk->{formchar} };
-
- Carp::croak("Unknown conversion in stringf: $hunk->{formchar}")
+ my $conv = $code->{ $hunk->{conversion} };
+
+ Carp::croak("Unknown conversion in stringf: $hunk->{conversion}")
unless defined $conv;
if (ref $conv) {
@@ -230,19 +231,19 @@
*positional_replace = __closure_replace(sub {
my ($self, $arg) = @_;
local $_ = $arg->{input}->[ $arg->{heap}{nth}++ ];
- return $arg->{conv}->($self, $_, $arg->{hunk}{passme});
+ return $arg->{conv}->($self, $_, $arg->{hunk}{argument});
});
*named_replace = __closure_replace(sub {
my ($self, $arg) = @_;
- local $_ = $arg->{input}->{ $arg->{hunk}{passme} };
- return $arg->{conv}->($self, $_, $arg->{hunk}{passme});
+ local $_ = $arg->{input}->{ $arg->{hunk}{argument} };
+ return $arg->{conv}->($self, $_, $arg->{hunk}{argument});
});
*indexed_replace = __closure_replace(sub {
my ($self, $arg) = @_;
- local $_ = $arg->{input}->[ $arg->{hunk}{passme} ];
- return $arg->{conv}->($self, $_, $arg->{hunk}{passme});
+ local $_ = $arg->{input}->[ $arg->{hunk}{argument} ];
+ return $arg->{conv}->($self, $_, $arg->{hunk}{argument});
});
}
@@ -255,16 +256,16 @@
for my $i (grep { ref $hunks->[$_] } 0 .. $#$hunks) {
my $hunk = $hunks->[ $i ];
- my $conv = $code->{ $hunk->{formchar} };
-
- Carp::croak("Unknown conversion in stringf: $hunk->{formchar}")
+ my $conv = $code->{ $hunk->{conversion} };
+
+ Carp::croak("Unknown conversion in stringf: $hunk->{conversion}")
unless defined $conv;
if (ref $conv) {
- $hunks->[ $i ]->{replacement} = $input->$conv($hunk->{passme});
+ $hunks->[ $i ]->{replacement} = $input->$conv($hunk->{argument});
} else {
$hunks->[ $i ]->{replacement} = $input->$conv(
- defined $hunk->{passme} ? $hunk->{passme} : ()
+ defined $hunk->{argument} ? $hunk->{argument} : ()
);
}
}
@@ -299,7 +300,7 @@
=head1 VERSION
-version 0.101620
+version 0.102080
=head1 WARNING
@@ -392,13 +393,35 @@
Format hunkers are passed strings and return arrayrefs containing strings (for
fixed content) and hashrefs (for formatting code sections).
-The semantics of the hashrefs returned are not yet stable enough to be worth
-documenting.
+The hashref hunks should contain at least two entries: C<conversion> for the
+conversion code (the s, d, or u in %s, %d, or %u); and C<literal> for the
+complete original text of the hunk. For example, a bare minimum hunker should
+turn the following:
+
+ I would like to buy %d %s today.
+
+...into...
+
+ [
+ 'I would like to buy ',
+ { conversion => 'd', literal => '%d' },
+ ' ',
+ { conversion => 's', literal => '%d' },
+ ' today.',
+ ]
+
+Another common entry is C<argument>. In the format strings expected by
+C<hunk_simply>, for example, these are free strings inside of curly braces.
+These are used extensively other existing helpers for things liked accessing
+named arguments or providing method names.
=head2 hunk_simply
This is the default format hunker. It implements the format string semantics
L<described above|/FORMAT STRINGS>.
+
+This hunker will produce C<argument> and C<conversion> and C<literal>. Its
+other entries are not yet well-defined for public consumption.
=head2 input_processor
@@ -596,8 +619,17 @@
=head1 AUTHORS
- Ricardo Signes <rjbs at cpan.org>
- Darren Chamberlain <darren at cpan.org>
+=over 4
+
+=item *
+
+Ricardo Signes <rjbs at cpan.org>
+
+=item *
+
+Darren Chamberlain <darren at cpan.org>
+
+=back
=head1 COPYRIGHT AND LICENSE
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=60809&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 Thu Jul 29 05:25:56 2010
@@ -2,7 +2,7 @@
use warnings;
package String::Formatter::Cookbook;
BEGIN {
- $String::Formatter::Cookbook::VERSION = '0.101620';
+ $String::Formatter::Cookbook::VERSION = '0.102080';
}
# ABSTRACT: ways to put String::Formatter to use
1;
@@ -17,7 +17,7 @@
=head1 VERSION
-version 0.101620
+version 0.102080
=head1 OVERVIEW
@@ -174,8 +174,17 @@
=head1 AUTHORS
- Ricardo Signes <rjbs at cpan.org>
- Darren Chamberlain <darren at cpan.org>
+=over 4
+
+=item *
+
+Ricardo Signes <rjbs at cpan.org>
+
+=item *
+
+Darren Chamberlain <darren at cpan.org>
+
+=back
=head1 COPYRIGHT AND LICENSE
More information about the Pkg-perl-cvs-commits
mailing list