develooper Front page | perl.perl5.porters | Postings from November 2014

[perl #122159] Bleadperl v5.21.1-11-g4077a6b breaks GFUJI/Text-Xslate-3.2.4.tar.gz

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
November 17, 2014 00:56
Subject:
[perl #122159] Bleadperl v5.21.1-11-g4077a6b breaks GFUJI/Text-Xslate-3.2.4.tar.gz
Message ID:
rt-4.0.18-25140-1416185811-882.122159-15-0@perl.org
On Thu Oct 16 18:49:50 2014, khw wrote:
> FWIW, I think this is useful to include in 5.22

I have just looked at Badger, and the offending code is this subroutine in lib/Badger/Utils.pm:

sub xprintf {
    my $format = shift;
    my @args   = @_;
    $format =~ 
        s{ < (\d+) 
             (?: :( [#\-\+ ]? [\w\.]+ ) )?
             (?: \| (.*?) )?
           > 
         }
         {   defined $3
                ? _xprintf_ifdef(\@args, $1, $2, $3)
                : '%' . $1 . '$' . ($2 || 's') 
        }egx;
    sprintf($format, @_);
}

Getting code like that to work around the warning is going to be a pain.  And, to me, this code seems perfectly idiomatic.  I’m not sure this warning is so helpful after all.  (Especially consider that redundant arguments are generally harmless, whereas missing arguments are generally indications of a bug.)

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=122159

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About