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

Re: Export from module in subdirectory

by toolic (Bishop)
on Oct 09, 2012 at 18:49 UTC ( #998054=note: print w/replies, xml ) Need Help??


in reply to Export from module in subdirectory

Inside test.pm you need to declare the package as:
package lib::test;

Then you can use min(); in test.pl.

That being said, you should eventually select better names than lib and test.

Replies are listed 'Best First'.
Re^2: Export from module in subdirectory
by tobyink (Abbot) on Oct 09, 2012 at 19:32 UTC

    "you should eventually select better names than lib and test"

    Interestingly, this was uploaded to CPAN just now... Test::Lib 0.001.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re^2: Export from module in subdirectory
by SuicideJunkie (Vicar) on Oct 09, 2012 at 19:07 UTC

    That makes total sense once someone has said it :) Thanks!

    I used lib and test for the cut-down sample rather than the 50k of original code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998054]
help
Chatterbox?
[Corion]: Oh yay. Thanks to The New Firefox, my irc client ChatZilla doesn't work anymore either... So I'll have to keep an old FF around just for that...
[Corion]: 100% of my FF add-ons are unsupported currently. Maybe upgrading Firefox wasn't such a good idea after all ;)
[Corion]: Also suffering is my 2-factor Github sign-in, as now, FF can't read my USB token anymore. "This was a horrible idea" is slowly dawning on me ;)
[Corion]: Yay. FF now has u2f built-in (behind an about:config setting), so using an USB token to sign in actually works :)
[Corion]: So, it's not all bad with the new FF :)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2017-11-20 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (293 votes). Check out past polls.

    Notices?