http://www.perlmonks.org?node_id=582269


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!

Replies are listed 'Best First'.
Re^4: Why " subroutined redefined" warning comes?
by Fletch (Bishop) 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();