Ok, so I implemented the eval variant of this and it seems to work well, thank you guys.
I now have a slightly different issue.
my::module::exit_routine is also passed into a simple logging module that I put together like this:
my $log = LogSimple->new(logdir => $logdir, logfile => $logfile, exit
+=> \&my::module::exit_routine )
In this particular script whenever my::module::exit_routine is called I need to pass the %modifier dispatch table so I need to setup the $log object like this:
my $log = LogSimple->new(logdir => $logdir, logfile => $logfile, exit
+=> \&my::module::exit_routine(\%modifier) )
Except this does not work, the error is:
Not a CODE reference at /usr/local/lib/perl5/site_perl/5.10.1/LogSimple.pm
I have to admit that my OOP is really in it's infancy.
Really not sure on this one so any help much appreciated.
Cheers,
Darren |