in reply to Re: use constant and exporter
in thread use constant and exporter

Hmm, that didn't seem to work at first... but I think I solved my problem. I wasn't really using package MyPackage... the package was Data::Validate::OO and I was using "use OO" because I was testing from within the same dir as Data::Validate::OO was being written in... so... it looks like it was failing to call export properly... I'm now using 'use lib' to use the full package name and it works again.



My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)

Replies are listed 'Best First'.
Re^3: use constant and exporter
by Aristotle (Chancellor) on Jan 28, 2003 at 22:33 UTC
    Well, that explains it. use Foo does this:
    BEGIN { require Foo; Foo->import; }
    If you use OO, require will find your module, but of course the module will still create the Data::Validator::OO package and not an OO package, causing the following OO->import to fail (silently).

    Makeshifts last the longest.

      Yah, the funny thing is, I think I knew about that once... then forgot about it... Oh well... thanks for the suggestions, at least your versions are better looking than mine. Encouraged me to clean up what I had :)



      My code doesn't have bugs, it just develops random features.

      Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)