Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: pl Perl One-Liner Magic Wand -- failing tests

by Daniel Pfeiffer (Acolyte)
on Jun 17, 2022 at 22:09 UTC ( [id://11144834] : note . print w/replies, xml ) Need Help??


in reply to Re^4: pl Perl One-Liner Magic Wand -- failing tests
in thread pl Perl One-Liner Magic Wand: looking for feedback

It's not the berries, because in the mean time cpantesters have reported success for 6 different Windows versions, all Strawberry.

Something in yours is loading this non-standard variant of Config, where I don't even see why it would load Config at all. I have modified the failing test a bit: sub i tracks the modifications of %INC, using keydiff. Could you please run

pl "$I = -1; sub i { ++$I; k $_, $INC{$_} for keys %INC } i; require Time::HiRes; i; for( @A, [$A[0], 123456] ) { E Isodate( $_, 0 ), I( 0.0, $_ ), I( $_, \"+0\" ), I( $_, 1 ), D( $_, -80, \"+90\", \"-9.5\" ), \"\"; Date \"08:45\", $_ } i" 123456789

For me it records only a single change, the module I explicitly require. (Isodate would too, but I wanted to see it in isolation.) If you want more fun, what E would do for echoing refs, you can add this before the end quote: ; require Data::Dumper; i

So much for maybe understanding. For the solution, I guess I'll have to drop my overzealous warnings (which I now realize, aren't complete anyway). Can you please remove '-W', from @cmd on line t/test.pm:51? Then please run perl t/unit.t

  • Comment on Re^5: pl Perl One-Liner Magic Wand -- failing tests

Replies are listed 'Best First'.
Re^6: pl Perl One-Liner Magic Wand -- failing tests
by Discipulus (Canon) on Jun 20, 2022 at 07:32 UTC
    Hello Daniel Pfeiffer,

    I hope the following will help

    cpan> look App::pl Working directory is R:\emoved\path\perl5.26.64bit\cpan\build\App-pl-0 +.90.2-1 Microsoft Windows [Versione 10.0.19044.1706] (c) Microsoft Corporation. Tutti i diritti sono riservati. C> cd t C>perl -lne "print if $. == 51" test.pm my @cmd = ($^X, $ENV{PLALT} // '../pl', @_); # +was: ($^X, '-W', $ENV{PLALT} // '../pl', @_) C>perl unit.t 1..8 ok 1 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "for( @A, [$A[0], 12 +3456] ) { E Isodate( $_, 0 ), I( 0.0, $_ ), I( $_, \"+0\" ), I( $_, 1 + ), D( $_, -80, \"+90\", \"-9.5\" ), \"\"; Date \"08:45\", $_ }" "123 +456789" "123456789.0" "123456789.1" "123456789.000001" "123456789.123 +456789" ok 2 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "$RESULT = \"$Q${quo +te}abc$q$Quote\"" ok 3 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "%R = qw(a 1 b 2 c 1 + d 3)" ok 4 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "%NUMBER = qw(a 1 b +2 c 1 d 3)" ok 5 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "-ENumber" "%N = qw( +a 1 b 2 c 1 d 3)" ok 6 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "-E" "N 3" "%N = qw( +a 1 b 2 c 1 d 3)" ok 7 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "form $_ = q!a%%b %% +1$d %x:%1$o %1$*1$b %%%1$X!, 27; tr/$/:/; F $_, 27" ok 8 - "perl5.26.64bit\perl\bin\perl.exe" "../pl" "-Mbignum" "Echo 123 +456789012345678901234567890 * 123456789012345678901234567890"

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^6: pl Perl One-Liner Magic Wand -- failing tests
by swl (Parson) on Jun 21, 2022 at 00:28 UTC

    The Portable::Config error could be a red herring. The portable versions of Strawberry perl load Config and update its contents so the various paths are updated when code is run.