When a module is used or required, the user (or requirer) is set up as a caller, accessible using caller. You can take advantage of that like so:
Hugounless (defined caller) { # run as command line script ... } 1;
In reply to Re: java/c has main - perl has ?
by hv
in thread java/c has main - perl has ?
by pmc2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |