Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: perl deferring die to calling method

by rfojta (Initiate)
on Dec 10, 2005 at 11:42 UTC ( [id://515713]=note: print w/replies, xml ) Need Help??


in reply to perl deferring die to calling method

I would rather use B::foo(); Try that.
  • Comment on Re: perl deferring die to calling method

Replies are listed 'Best First'.
Re^2: perl deferring die to calling method
by fmerges (Chaplain) on Dec 10, 2005 at 14:00 UTC

    Hi,

    I would also do so...

    If you were using OO then calling B->foo() would be the best method, but on your example you're not using OO only funcion call, and when calling it with B->foo(), you must know that the first argument in @_ is the package name 'B'.

    So go for B::foo() or take a look at the Exporter module.

    Also is good to read the manuals about perlref, perlboot.

    There was also a module, think it was by Brian D Foy, something to make alias to the package names inside your package scope...

    Regards,

    fmerges at irc.freenode.net

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found