in reply to Re: Perl 28 broke L: How to fix?
in thread Perl 28 broke L: How to fix?

Fortunately it's really just saving a few keystrokes; one-liners will survive without it. Also worth noting, perhaps: Object/Class-method calls do work. It's functions (non-methods) that trip up the error.

I find it very valuable and wish to retain the ability to use modules on the command line without having to refer to them twice and tinker with -M! As for the second point, you would think so, but check this out:

perl -ML -e 'print Data::Dumper->Dump([HTTP::Tiny->new->get(q(https:// +www.perlmonks.org))->{headers}])'

5.26

$VAR1 = {
          'server' => 'Apache/2.4.41',
          'etag' => '"f059-595f109c01e50"',
          'date' => 'Mon, 28 Oct 2019 04:38:47 GMT',
          'last-modified' => 'Mon, 28 Oct 2019 04:36:06 GMT',
          'content-length' => '61529',
          'accept-ranges' => 'bytes',
          'content-type' => 'text/html'
        };

5.28

$VAR1 = {
          'content-type' => 'text/plain',
          'content-length' => 110
        };


<Twilight Zone Music>

Replies are listed 'Best First'.
Re^3: Perl 28 broke L: How to fix?
by Athanasius (Archbishop) on Oct 28, 2019 at 07:14 UTC

    Don’t know what went wrong for you, but it’s working fine for me:

    17:17 >perl -ML -e "print Data::Dumper->Dump([HTTP::Tiny->new->get(q(h +ttps://www.perlmonks.org))->{headers}]);" $VAR1 = { 'content-type' => 'text/html', 'server' => 'Apache/2.4.41', 'etag' => '"e57e-595f34244bafb"', 'content-length' => '58750', 'last-modified' => 'Mon, 28 Oct 2019 07:15:04 GMT', 'accept-ranges' => 'bytes', 'date' => 'Mon, 28 Oct 2019 07:18:01 GMT' }; 17:18 >mversion -f L Data::Dumper HTTP::Tiny L v1.0.1 Data::Dumper 2.173 HTTP::Tiny 0.070 17:18 >perl -v This is perl 5, version 28, subversion 0 (v5.28.0) built for MSWin32-x +64-multi-thread

    Strawberry Perl v5.28.0 under Windows 8.1, 64-bit. Same (correct) result using Perl v5.30.0.

    Cheers,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,