Hey all,
Right I've searched far and wide for this but can only find information on how to make a perl module, not how to organise them.
I've made a few perl modules, for example
Joe.pm
Andy.pm
Sam.pm
and i want to place them into a sub folder called PEOPLE.
So i assume i must rename the 'package' statement at the top of the modules to PEOPLE::Joe etc then move all the .pm's into that directory.
Now when i create a test script to call a print function from any one of these modules it says:
yet at the top of my Test.pl code i have included the statement:
use PEOPLE::Joe;
any ideas on how this is done? I'm going to have alot more files and i like things neat and tidy in folders
!
thanks
andy
Right I've searched far and wide for this but can only find information on how to make a perl module, not how to organise them.
I've made a few perl modules, for example
Joe.pm
Andy.pm
Sam.pm
and i want to place them into a sub folder called PEOPLE.
So i assume i must rename the 'package' statement at the top of the modules to PEOPLE::Joe etc then move all the .pm's into that directory.
Now when i create a test script to call a print function from any one of these modules it says:
Code:
Can't locate object method "new" via package "Joe" (perhaps you forgot to load "Joe"?) at Test.pl line 4.
yet at the top of my Test.pl code i have included the statement:
use PEOPLE::Joe;
any ideas on how this is done? I'm going to have alot more files and i like things neat and tidy in folders
thanks
andy