I prefer the following approach:
Main .pm file is just a normal .pm file
There is a tiny .pl script with executable permissions which call main() in main module
This script is possibly autogenerated or uses FindBin to setup @INC
Example is perlbrewIn reply to Re: Main routines, unit tests, and sugar
by vsespb
in thread Main routines, unit tests, and sugar
by stephen
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |