From: Gaetan l. L. <ga...@sg...> - 2003-04-01 01:40:42
|
I would guess that splitdir is not included in File::Spec module. Look at the @INC array for the path to look at, to find module. You may have another module called the same way In your startup call, print out the value of @INC, and look at those directory to see if there is another File::SPEC file. Actually, File::SPEC should be a file named File/SPEC.pm, where the file Spec.pm is inside the File directory To printout the array do print "@INC\n"; That would be my first guess On Mon, Mar 31, 2003 at 10:28:41PM +1200, Andrew McLaren wrote: > I have some logic that runs 100% standalone, but hits problems when running > under Misterhouse. This logic access an external function, which itself uses > the Log4perl tracing subsystem. This requires the Log4perl subsystem to be > initialised, which is typically done in the mainline prior to the function > being called. I've set this up in Misterhouse as follows; > > #noloop=start > use Log::Log4perl; > #noloop=stop > > if ($Startup) > { > Log::Log4perl -> init (<logfile>); > } > > if ($New_minute) > { > &some_function_that_uses_log4perl (); > } > > When Misterhouse triggers the function, the following error is reported; > > Error in user code file: ....mh_temp.user_code > <timestamp>: Can't locate object method "splitdir" via package "File::Spec" > at /usr/lib/perl5...../Log/Log4perl/Layout/PatternLayout.pm line 283. > > File::Spec should be loaded by Log4perl. I've tried a manual "use" on this, > but to no avail. I've also tried putting the initialisation in the same loop > as the function that needs it (won't do any harm, but a bit less efficient), > but this doesn't help either. I guess Misterhouse is providing a different > context to the user code than what it has standalone. > > Any ideas on how to resolve this, or even how to chase down the problem. > It's even hard getting a debugger in there to see what happens when it > executes. > > Andrew > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > ________________________________________________________ > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 -- -- ---------------------------------------------------------------------- Gaetan Lord - FTA - ga...@sg... - SGI - Montreal, Canada "There is no future in time traveling" ---------------------------------------------------------------------- 8:35pm up 6 days, 7:54, 14 users, load average: 0.28, 0.33, 0.25 |