Skip Menu |

This queue is for tickets about the String-Expando CPAN distribution.

Report information
The Basics
Id: 132842
Status: open
Priority: 0/
Queue: String-Expando

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: optional fomat strings not working


Running code based on the SYNOPSIS results in unepted behavior: fe.

   $ perl
   use String::Expando;
   $e = String::Expando->new;
   print $e->expand('%(foo) %(bar)', { foo => 'Hello', bar => 'world!' }), "\n";
   print $e->expand(
       '### %04d(year)-%02d(month)-%02d(day)',
       { year => 2011, month => 3, day => 9 }
   ), "\n";
   ### 2011-03-09
   ^d
   Hello world!
   Redundant argument in sprintf at /home/perl/lperl5/ib/perl5/site_perl/5.30.0/String/Expando.pm line 107.
   Redundant argument in sprintf at /home/perl/lib/perl5/perl5/site_perl/5.30.0/String/Expando.pm line 107.  
   Redundant argument in sprintf at /home/perl/perl5/versions/5.30.0/lib/perl5/site_perl/5.30.0/String/Expando.pm line 107.
   ### 04d-02d-02d

Tested on Perls 5.8.9, 5.10.1, 5.24.1 and 5.30.1.  5.8.9 and 5.10.1 do not warn about sprintf but return the same value