Switch branches/tags
Commits on Jun 21, 2014
  1. Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b (yet again)

    Ævar Arnfjörð Bjarmason committed Jun 21, 2014
    I was being silly with my test improvements in v5.21.1-12-g826af13 and
    v5.21.1-13-g43d7f0d. I haven't been able to test this on Win32 where
    it's breaking, but if the sprintf format isn't recognized there we're
    going to get a warning about a *redundant* argument in printf, not a
    missing one, i.e. just like this:
        $ ./perl -Ilib -we 'printf "%æ\n", "str"'
        Invalid conversion in printf: "%\303" at -e line 1.
        Redundant argument in printf at -e line 1.
    So fix that, I'm certain this will fix the black smoke on Win32, if not
    I have no idea what's going on.
  2. lib/locale.t: Improve debug info

    khwilliamson committed Jun 21, 2014
    I find myself needing to get the percentage of locales failing when
    looking at field reports with debugging on.  This commit adds that
  3. Make like() and unlike() in t/ refuse non-qr// arguments

    Ævar Arnfjörð Bjarmason committed Jun 21, 2014
    As I noted in v5.21.1-12-g826af13 we have subtle bugs in the test suite
    because you can do e.g. like($@, '') now which'll be a passing test even
    when we have an error, because $@ =~ // will be true.
    I'm just changing t/ to not accept non-Regexp arguments, and
    fixing up a bunch of test failures that resulted from that. There might
    still be more of these in tests that I'm just not running, I've also
    changed some of these from $str =~ /foo/ to $str eq 'foo'
    (i.e. s/like/is/) in cases where that appeared to work, but it might
    break some systems.
    Let's just find that out via the smokers.
  4. Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b (again)

    Ævar Arnfjörð Bjarmason committed Jun 21, 2014
    Fix a silly bug in v5.21.1-12-g826af13, when $Q was false I added 12
    extra test, but didn't declare them, do that.
  5. Fix black Win32 smoke broken by my v5.21.1-11-g4077a6b

    Ævar Arnfjörð Bjarmason committed Jun 21, 2014
    The problem with this was that I didn't test this on a system where $Q
    was false. On those systems we not only warn about "Invalid conversion"
    but also about the missing sprintf argument, as intended.
    The test broke because the local __WARN__ handler would clobber the
    "conversion" warning with the "missing" warning, the fix is easy, just
    accumulate the warnings with ".=".
    While poking at this I discovered a bug that's been here ever since the
    test was added back in v5.10.0-1461-g53f65a9. If we emitted a warning on
    systems where $Q was true we'd pass the test, this is because the empty
    regex will match warnings, the test actually meant to use is() not
    like(). It's also a bug that t/ accepts non-regexes as the second
    argument, Test::More doesn't:
        $ perl -MTest::More -wle 'like "", ""'
        not ok 1
        #   Failed test at -e line 1.
        #     '' doesn't look much like a regex to me.
        # Tests were run but no plan was declared and done_testing() was not seen.
    This change might cause some additional black smoke because we'll now be
    detecting warnings that we previously ignored, but I don't think this'll
    fail on systems where $Q is true.
  6. Add a new warning about redundant printf arguments

    Ævar Arnfjörð Bjarmason committed Jan 19, 2014
    Implement RT #121025 and add a "redundant" warning category that
    currently only warns about redundant arguments to printf. Now similarly
    to how we already warned about missing printf arguments:
        $ ./miniperl -Ilib -we 'printf "%s\n", qw()'
        Missing argument in printf at -e line 1.
    We'll now warn about redundant printf arguments:
        $ ./miniperl -Ilib -we 'printf "%s\n", qw(x y)'
        Redundant argument in printf at -e line 1.
    The motivation for this is that I recently fixed an insidious
    long-standing 6 year old bug in a codebase I maintain that came down to
    an issue that would have been detected by this warning.
    Things to note about this patch:
     * It found a some long-standing redundant printf arguments in our own
       ExtUtils::MakeMaker code which I submitted fixes to in
       Perl-Toolchain-Gang/ExtUtils-MakeMaker#84 and
       those fixes were merged into blead in v5.19.8-265-gb33b7ab
     * This warning correctly handles format parameter indexes (e.g. "%1$s")
       for some value of correctly. See the comment in t/op/sprintf2.t for
       an extensive discussion of how I've handled that.
     * We do the correct thing in my opinion when a pattern has redundant
       arguments *and* an invalid printf format. E.g. for the pattern "%A%s"
       with one argument we'll just warn about an invalid format as before,
       but with two arguments we'll warn about the invalid format *and* the
       redundant argument.
       This helps to disambiguate cases where the user just meant to write a
       literal "%SOMETHING" v.s. cases where he though "%S" might be a valid
       printf format.
     * I originally wrote this while the 5.19 series was under way, but Dave
       Mitchell has noted that a warning like this should go into blead
       after 5.20 is released:
           "[...] I think it should go into blead just after 5.20 is
           released, rather than now; I think it'd going to kick up a lot of
           dust and we'll want to give CPAN module owners maximum lead time
           to fix up their code. For example, if its generating warnings in
           cpan/ code in blead, then we need those module authors to fix
           their code, produce stable new releases, pull them back into
           blead, and let them bed in before we start pushing out 5.20 RC
       I agree, but we could have our cake and eat it too if "use warnings"
       didn't turn this on but an explicit "use warnings qw(redundant)" did.
       Then in 5.22 we could make "use warnings" also import the "redundant"
       category, and in the meantime you could turn this on
       There isn't an existing feature for adding that kind of warning in
       the core. And my attempts at doing so failed, see commentary in RT
    The warning needed to be added to a few places in sv.c because the "",
    "%s" and "%-p" patterns all bypass the normal printf handling for
    optimization purposes. The new warning works correctly on all of
    them. See the tests in t/op/sprintf2.t.
    It's worth mentioning that both Debian Clang 3.3-16 and GCC 4.8.2-12
    warn about this in C code under -Wall:
        $ cat redundant.c
        #include <stdio.h>
        int main(void) {
            printf("%d\n", 123, 345);
            return 0;
        $ clang -Wall -o redundant redundant.c
        redundant.c:4:25: warning: data argument not used by format string [-Wformat-extra-args]
            printf("%d\n", 123, 345);
                   ~~~~~~       ^
        1 warning generated.
        $ gcc -Wall -o redundant redundant.c
        redundant.c: In function ‘main’:
        redundant.c:4:5: warning: too many arguments for format [-Wformat-extra-args]
             printf("%d\n", 123, 345);
    So I'm not the first person to think that this might be generally
    There are also other internal functions that could benefit from
    missing/redundant warnings, e.g. pack. Neither of these things currently
    warn, but should:
        $ perl -wE 'say pack "AA", qw(x y z)'
        $ perl -wE 'say pack "AAAA", qw(x y z)'
    I'll file a bug for that, and might take a stab at implementing it.
  7. Split up the fake "missing" warning category into an actual category

    Ævar Arnfjörð Bjarmason committed Jan 19, 2014
    Ever since the warning for missing printf arguments was added in
    v5.11.2-116-g7baa469 the "missing" warning category has been defined in
    terms of the "uninitialized" category, so you couldn't turn it on/off
    independently of that.
    As discussed in RT #121025 I'm hacking on adding a new "reduntant"
    category for too many printf arguments. So add the long-missing
    "missing" category in preparation for that for consistency.
  8. Untie STDERR in IPC::Open3.

    dtikhonov committed with jkeenan Jun 7, 2014
    Add Dmitri Tikhonov to Perl 5 AUTHORS.
    Increment IPC/ $VERSION.
    For: RT #119843, originally reported by A.N.
Commits on Jun 20, 2014
  1. Fix typo... nothing to see here

    wolfsage committed Jun 20, 2014
  2. perlfunc: clarify our [perl #122132]

    xdg committed Jun 20, 2014
  3. Add Epipgraph for 5.21.1

    wolfsage committed Jun 20, 2014
  4. Add new perldelta for 5.21.2

    wolfsage committed Jun 20, 2014
  5. Add new release to perlhist

    wolfsage committed Jun 20, 2014
  6. Finalize perldelta

    wolfsage committed Jun 20, 2014
Commits on Jun 19, 2014
  1. Avoid blank lines in backslash warnings test.

    craigberry committed Jun 19, 2014
    This is a follow-up to 12f55bbce575aecc, which fell victim to a
    bug workaround. Because the broken pipes on VMS sometimes put
    multiple blank lines in test output, we collapse multiple newlines
    into one.  Which breaks tests that genuinely have multiple blank
    lines in the output.
    So don't leave the output blank, which coincidentally makes it a
    lot easier to see which print statement produces which line of
  2. fix a typo in perl520delta

    rjbs committed Jun 19, 2014
  3. Remove x2p remnants

    wolfsage committed Jun 19, 2014
  4. Note the open RT ticket.

    jhi committed Jun 19, 2014
  5. Lower the optimization on Digest-SHA for HP-UX cc.

    jhi committed Jun 19, 2014
    Upstream, but we are adding a platform specific hints file.
  6. The g++ flags removal was not right.

    jhi committed Jun 19, 2014
  7. Silence -Wunused-parameter my_perl under threads.

    jhi committed Jun 18, 2014
    For S_ functions, remove the context.
    For Perl_ functions, add PERL_UNUSED_CONTEXT.
    Tricky because sometimes depends on DEBUGGING, and sometimes
    on whether we are have PERL_IMPLICIT_SYS.
    (Why all the mathoms Perl_is_uni_... and Perl_is_utf8_...
    functions are not being whined about is a mystery.)
    vutil.c (included via util.c) has one of these, but it's cpan/,
    and a known problem: