in reply to does a subroutine exist? defined vs glob
Running it under 5.10 where the subroutine doesn't exist I think suggests an explaination:
C:\test>1135926.pl $VAR1 = ''; $VAR1 = ''; Goto undefined subroutine &Config::non_bincompat_options at C:/perl64/ +lib/Config_heavy.pl line 1290.
Ie. It is autoloaded.
Which is confirmed by running it with 5.18 and -d:Trace I get:
>> [0] 1135926.pl : 7: pp( Config::non_bincompat +_options() ); >> [0] C:/perl5.18/perl/lib/Config.pm: 81: require 'Config_heavy +.pl'; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 5: use strict; ... >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 6: use warnings; ... >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 7: use vars '%Config'; ... >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 75: our $summary = <<'! +END!'; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 108: my $summary_expande +d; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 129: local *_ = \my $a; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 130: $_ = <<'!END!'; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1231: my $i = ord(8); ... >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1233: our $byteorder = jo +in('', unpack('aaaaaaaa', pack('Q', $i))); >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1234: s/(byteorder=)(['"] +).*?\2/$1$2$Config::byteorder$2/m; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1236: my $config_sh_len = + length $_; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1238: our $Config_SH_expa +nded = "\n$_" . << 'EOVIRTUAL'; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1244: eval { >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1246: require 'Confi +g_git.pl'; >> [0] C:/perl5.18/perl/lib/Config_git.pl: 5: $Config::Git_Data=<<' +ENDOFGIT'; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1247: $Config_SH_exp +anded .= $Config::Git_Data; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1248: 1; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1275: my $prevpos = 0; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1301: *DELETE = *CLEAR = +\*STORE; # Typeglob aliasing uses less space >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1342: 1; >> [0] C:/perl5.18/perl/lib/Config.pm: 82: goto \&launcher unles +s $Config::AUTOLOAD =~ /launcher$/; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1338: undef &AUTOLOAD +; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 1339: goto \&$Config: +:AUTOLOAD; >> [0] C:/perl5.18/perl/lib/Config_heavy.pl: 14: return split ' +', (Internals::V())[1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: does a subroutine exist? defined vs glob
by Anonymous Monk on Jul 23, 2015 at 16:44 UTC | |
by Anonymous Monk on Jul 23, 2015 at 16:54 UTC |