knowmad has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I've sought high and low for an answer to my predicament. I am running several scripts on a mod_perl server. Both Carp and CGI::Carp are being loaded. In one of my modules (Petal), code is evaluated inside of a Safe compartment. When calling confess inside of this compartment, I get the following fatal error from CGI::Carp:
Can't locate object method "splitpath" via package "File::Spec" (perhaps you forgot to load "File::Spec"?) at /usr/share/perl/5.6.1/CGI/Carp.pm line 317.I wrote a test that proves this is only an issue with Safe and CGI::Carp (which is the topic for another discussion). For a quick workaround, I was hoping to find a way to tell my code being evaluated to use Carp::confess instead of using CGI::Carp. I can't convince it to do that. Is there a way to tell Perl which module to use for a method that is defined in more than one module?
Thanks!
William
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Mixing Carp and CGI::Carp
by chromatic (Archbishop) on Oct 17, 2003 at 23:12 UTC | |
by knowmad (Monk) on Oct 18, 2003 at 02:57 UTC | |
Re: Mixing Carp and CGI::Carp
by Anonymous Monk on Oct 17, 2003 at 22:48 UTC | |
by knowmad (Monk) on Oct 18, 2003 at 03:00 UTC |