In order to use OO to it's fullest, you will need to create a constructor ('new' method) and then you can instantiate an object with your class:
package Test; ... sub new { my $self = {}; bless $self; return $self; } ... use Test; my $test_var = new Test; $test_var->Prt("This is a test in the Mod\n");
You should also take a look at perltoot which has some more details about how to create constructors.
Update: You should make sure that your module does not have the same name as an already installed module, or else you can cause yourself some unneeded confusion.
Update: why do I need to use OO stuff? You don't need to use the OO stuff. Your statement was 'Any help would be greatly appreciated' and I was simply offering another solution. Sorry for the confusion.
--
hiseldl
What time is it? It's Camel
Time!
In reply to Re: Undefined subroutine
by hiseldl
in thread Undefined subroutine
by J9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |