Dumping mod_perlified variables--what's the local namespace?
I have a mod_perl script:
use strict;
use warnings FATAL => 'all';
use 5.010001;
my $face = 'ugly';
use Data::Dump qq(pp);
die pp($Mo开发者_运维百科dPerl::ROOT::ModPerl::Registry::C_3a_www_test_2epl::face);
It dies undef at C:/www/test.pl line 8.
I was expecting "ugly" at C:/www/test.pl line 8.
If instead I
die pp(%ModPerl::ROOT::ModPerl::Registry::C_3a_www_test_2epl::);
...after restarting the service to clear any cached variables, face
is not even listed.
I could have sworn this code was working the last time I used it...I wrote a whole die
hook around this way of naming local variables so that I could get at certain local variables to dump debug information.
What's the local namespace?
Only variables shared using our
are accessible this way.
精彩评论