in reply to Defining a function in the caller's package
*{"$target\::nx"} = do { package soemthing; sub { do_something() } } ... The problem seems to be that your anonymous sub remembers where it was first compiled.
I'd recommend doing this job with Exporter though. Is there some reason that doesn't fit? (Probably because it would use the master namespace, now that I think about it.)
-Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Defining a function in the caller's package
by rovf (Priest) on Aug 08, 2008 at 11:57 UTC | |
|
Re^2: Defining a function in the caller's package
by rovf (Priest) on Aug 08, 2008 at 12:01 UTC | |
by jettero (Monsignor) on Aug 08, 2008 at 12:14 UTC |