in reply to Can't Use Storable on OS X?

Well, looking at the source for Storable (2.07) on cpan, it seems to me that Log::Agent is optional, as is evidenced by the following code taken from Storable.pm:

# # Use of Log::Agent is optional # eval "use Log::Agent";

So either you're using a different version of Storable, in which Log::Agent is required (I find that hard to believe), or there's a bug in Storable, or something else is going on. Can you provide some sample code, and perhaps actual error messages that you're getting, something more informative than 'it keeps giving fatal errors because it can't find Log::Agent'?

I hope you can get Storable to work for you, since it's a great module, but as a fall-back plan, you could try storing your Hash of Arrays using Data::Dumper itself, printing the dump to a file, then evaling it back in...

--
3dan

Replies are listed 'Best First'.
Re: Re: Can't Use Storable on OS X?
by Cody Pendant (Prior) on Jun 17, 2003 at 23:39 UTC
    I'm a bit confused now.

    Are you saying I can just comment out that 'eval' statement and not get the error?

    More details -- I get:

    Agent.pm: Can't locate Log/Agent.pm in @INC (@INC contains: /System/Li +brary/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/ +Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl + /Network/Library/Perl .) at (eval 3) line 2. BEGIN failed--compilati +on aborted at (eval 3) line 2.

    Update: OK commenting out the eval statement didn't make any difference, but in hindsight that was a bit stupid.

    But I'm more confused than ever.

    If I don't use Carp's fatalsToBrowser, then everything works fine, as far as I can see. So something, somewhere, has a fatal error, but it's not fatal to my script, it's fatal to one of the modules?

    So I should turn off fatalsToBrowser before I use Storable, and turn it back on after?

    Also, this is a broader definition of "fatal" than I was expecting. Obviously I don't understand the "exception paradigm" mentioned in the Storable docs.



    “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
    M-J D

      (Sorry it has taken me a while to reply, but I don't have much to offer - just didn't want to leave you hanging)

      I'm confused by that error message, too. Do you have your own module Agent.pm in which you have a 'use Log::Agent'? Wait, that doesn't make sense, because the error says it's coming from within an eval... um, sorry I can't be of much help, unless you want to try posting your actual code to your scratchpad, or something... good luck!

      --
      3dan