Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: 'base' versus @ISA, why?

by creamygoodness (Curate)
on Jul 24, 2007 at 14:56 UTC ( #628487=note: print w/replies, xml ) Need Help??


in reply to 'base' versus @ISA, why?

I ran into base.pm's flakiness just yesterday after sprinkling in the following debug line:

warn "RDBO version: $Rose::DB::Object::VERSION;"

Because that caused base.pm's dubious heuristic to indicate that there was no need to require Rose::DB::Object I saw an error message along the lines of...

Can't locate object method "mk_ro_accessors" via package "Foo" at basebug.plx line 11.

The workaround:

END { no strict; warn "RDBO version: " . ${ 'Rose::DB::' . 'Object::VERSION' }; }

The $Foo::VERSION scalar doesn't have to be assigned to; its mere presence in the code as a package global gives it a stash entry and an undefined value. That's apparently enough for base.pm.

base.pm is a good idea, but the implementation is problematic.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com

Replies are listed 'Best First'.
Re^2: 'base' versus @ISA, why?
by adrianh (Chancellor) on Jul 25, 2007 at 12:35 UTC
    I ran into base.pm's flakiness just yesterday

    Which version of Perl? (and did you submit a bug report :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://628487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2022-05-27 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (94 votes). Check out past polls.

    Notices?