http://qs321.pair.com?node_id=751760


in reply to Re^2: override keywords "my" and "our"
in thread override keywords "my" and "our"

For lexical variables, you may be able to do something with Lexical::Persistence.

#!perl use warnings; use strict; use Lexical::Persistence; # Create a new dynamic closure. my $dc = Lexical::Persistence->new(); # Prime a variable with a value. $dc->set_context( _ => { '$cat' => "persistent" } ); # Call a function within it. $dc->call(\&function); exit; sub function { # $cat is already initialized. print "persistent cat is '", my($cat), "'\n"; }