in reply to Re^2: Knowing when a code string contains code that will be executed at compile-time/end?
in thread Knowing when a code string contains code that will be executed at compile-time/end?

They should show up when applying B::Deparse

Nope, as the OP shows. Plus deparsing requires an eval of the string first.

use warnings; use strict; use B::Deparse; my $code = q{ print "code\n"; s s s END { print "end\n" } see }; my $coderef = eval qq{ sub { $code } }; my $deparse = B::Deparse->new(); $deparse->ambient_pragmas(strict => 'all', warnings=>'all'); print $deparse->coderef2text($coderef), "\n"; __END__ { print "code\n"; s/ /();/ee; } end
  • Comment on Re^3: Knowing when a code string contains code that will be executed at compile-time/end?
  • Download Code