Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: vs @ISA (typos)

by adrianh (Chancellor)
on Oct 09, 2007 at 11:52 UTC ( #643668=note: print w/ replies, xml ) Need Help??

in reply to Re: vs @ISA (typos)
in thread vs @ISA

For me, the major advantage of was that it originally would catch typos for you. Since use base qw( Food::Barf ); would die if there was no Food/ to load (because the module's name is actually Foo::Bar).

That's interesting. I never knew base() ever did that. When did the functionality change?

Personally I like the current behaviour more - since I can switch between inline and file-based classes without having to change any code. A definite plus as far as I'm concerned.

Comment on Re^2: vs @ISA (typos)
Replies are listed 'Best First'.
Re^3: vs @ISA (typos)
by tye (Sage) on Oct 09, 2007 at 14:57 UTC

    There is little reason for the two features to be mutually exclusive.

    All that is needed is a better choice for when to not require and to not then also ignore if require fails.

    Also note that the behavior that several people have had problems with and that caused me to stop using the module (and that Schwern appeared to abandon trying to fix) is the one that forces people to add require even though they used base. So running into that problem would break your favorite feature.

    So the fixes I would make would prevent your pet feature from breaking.

    Also note that there are several pitfalls to putting multiple related classes into a single file (just a few days ago somebody at PerlMonks had exactly that problem) and as I would fix it would require that parent classes be defined before derived classes, which might catch some problems for some people but might be inconvenient for you.

    - tye        

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2015-11-27 05:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls