How can I specify that Smart::Comments be loaded for my original script, as well as for any of the modules it directly loads. However, since it is a source-filter, it would probably wreck havoc if applied to every module loaded by every other loaded module.
For example, my script includes
use Neu::Image;
I would like to load Smart::Comments
for Neu::Image
as well, but specifying
$ perl -MSmart::Comments script.pl
does not load Smart::Comments
for Neu::Image
.
This behavior is described in the Smart::Comments documentation:
If you're debugging an application you can also invoke it with the module from the command-line:
perl -MSmart::Comments $application.pl
Of course, this only enables smart comments in the application file itself, not in any modules that the application loads.
A few other things that I've looked at already:
- Perl Command-Line Options
- perldoc perlrun (I searched it for the word "module")
WORKAROUND As gbacon mentions, Smart::Comments provides an environment variable option that would allow turning it on or off. However, I would like to be able to turn it on without modifying the original source, if possible.