Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(tye)Re: Method calling question...

by tye (Sage)
on May 01, 2001 at 02:43 UTC ( #76800=note: print w/replies, xml ) Need Help??


in reply to Method calling question...

I can think of a few reasons why this might fail.

First, I don't see any require Foo nor require Bar (or replace require with use).

Second, you can replace @ISA= qw(Base) with use base qw(Base) which has some advantages. But I have more important reasons for mentioning that: On file systems that ignore upper- vs. lower-case in file names, use Base could end up loading base.pm instead of Base.pm, which would also break your code.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
use base qw(Base) (was: Method calling question...)
by jplindstrom (Monsignor) on May 01, 2001 at 03:04 UTC
    Second, you can replace @ISA= qw(Base) with use base qw(Base)

    This sounds very interesting. Could you point me to a man page about this (or explain a little more about what Perl mechanism that makes it work)?

    /J

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: (tye)Re: Method calling question...
by spaz (Pilgrim) on May 01, 2001 at 03:08 UTC
        "On file systems that ignore upper- vs. lower-case in file names, use Base could end up loading base.pm instead of Base.pm..."

    Uhm, no.

    If the file system is case-insensitive, then Base.pm == base.pm.

    -- Dave

      Perhaps you neglect to consider that require and use search more than one directory. If Base.pm is in your current directory, then base.pm from the standard Perl install will be found and used instead of your file.

              - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2023-12-05 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (27 votes). Check out past polls.

    Notices?