Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Why " subroutined redefined" warning comes?

by joeface (Pilgrim)
on Nov 04, 2006 at 20:44 UTC ( #582269=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Why " subroutined redefined" warning comes?
in thread Why " subroutined redefined" warning comes?

Ahhhh... learned something new, thanks to your reply.

So, yes, I want Spinner to export the spin() function, to save me from having to do Spinner::spin(), but now I know why I have it that way, and what to change if I decide not to export it.

You've also shown us a different way to keep the subs separate, if need be.

Thanks!


Comment on Re^3: Why " subroutined redefined" warning comes?
Re^4: Why " subroutined redefined" warning comes?
by Fletch (Chancellor) on Nov 05, 2006 at 00:35 UTC

    An option if you don't import it is to alias it to another name in your package.

    use Spinner (); local *s_pin = \&Spinner::spin; s_pin(); spin();

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-07-31 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (254 votes), past polls