in reply to lazily getting around an Exporter problem
You apparently have already tried to stop Contextual::Return from exporting SCALAR ARRAYREF HASHREF and that breaks something mysterious, right?
Ok, here are several lazy hacks that I'd try. I am a monk assuredly more foolish and confused than many. Due to my ignorance, they are unlikely to work, but some helpful monk may explain to me why not, and thus I will profit.
Vandalism: I'd fire up EMACS on all the .pl / .pm files in Contextual::Return. I'd replace every occurence of
SCALAR => SCALARdangit
ARRAYREF => ARRAYREFdangit
HASHREF => HASHREFdangit,
and try the MAKE again.
I'm assuming you have EMACS. No doubt someone else can supply the method for vi. (You could also do this with a perl script, or maybe even a single command line, but not me.) To invoke Tags Query Replace, you first create a tag-table. Go to the directory where you put Contextual::Return
which creates a TAGS file. Go into emacs and command% etags `find . -name '*.p[lm]' -print`
Do the replace three times, changing each of the offending variables. Default is that this replace is case sensitive. Save all changed files (c-x s).M-x Visit Tags Table M-x Tags-Query-Replace
After I'd given up on that approach, I'd try
Stealth: I'd create a dummy module, with its own package, that used Contextual::Return. The only things I'd export out of it would be the specific Contextual::Return functions that I needed, not including SCALAR ARRAYREF HASHREF. Then I'd use that dummy module in my main module.
throop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: lazily getting around an Exporter problem
by meraxes (Friar) on Oct 04, 2007 at 22:00 UTC |