Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: RFC: pragma pragmatic

by shmem (Chancellor)
on Aug 10, 2017 at 08:27 UTC ( [id://1197135]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: pragma pragmatic
in thread RFC: pragma pragmatic

Heh... the offending line is

- my $loadstr = @args ? "use $mod" : "use $mod qw(@args)"; + my $loadstr = @args ? "use $mod qw(@args)" : "use $mod";

Silly bug, sorry... thanks for the report! Corrected in the OP.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^3: RFC: pragma pragmatic
by Athanasius (Archbishop) on Aug 10, 2017 at 10:23 UTC

    Thanks, but now I’m getting an error instead:

    20:20 >perl -I. main.pl Not a GLOB reference at pragmatic.pm line 26. BEGIN failed--compilation aborted at main.pl line 12. 20:20 >

    (Line 12 in my main.pl file is the first occurrence of use pragmatic Foo;)

    Update: That was under Strawberry Perl 5.26.0, and I get the same error with Cygwin Perl 5.22.4. But Strawberry Perl 5.20.2 seems to be working correctly:

    20:26 >perl main.pl Foo::foo at line 13 main::foo at line 16 Foo::foo at line 19 main::foo at line 22 Foo::foo at line 25 20:26 >

    (Those line numbers are correct in my main.pl file.)

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

      If you insert

      warn ${$stash}{$symbol},"\n";

      before line 26, you see what happens. Version 5.20.2 displays

      *main::foo

      whereas v5.26.0 displays something like

      CODE(0x123abc)

      Sigh. The glob dereferencing to get at the code reference of a glob must have changed somewhere after 5.20.2, so I'll have to rewrite the symbol handling part. I'll update the OP as soon as this is done.

      update: OP updated.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
      Not a GLOB reference at pragmatic.pm line 26.

      Hmm. I don't do much Windows, but I have some VM machines of that on the shelf. I'll look into that. Thanks again.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found