Most typically, you would define the subroutine in the package where the constructor is being called -- probably package main;.
Note: for the most part, Perl classes, modules and packages (with the exception of main) are generally spelled in upper and lower case: MyPackage or My::Package -- not in all upper case.
In reply to Re: calling a subroutine while Initializing new
by jkeenan1
in thread calling a subroutine while Initializing new
by opensourcer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |