|No such thing as a small change|
while do-able, doing so makes life much more complicated for your users.
you want a module that can be run as a script, but the search paths for scripts (OS determined) and modules (Perl determined) are different. if it's in a place where it could be run as a script, then it can't be loaded as a module w/o hackery. ditto for the reverse, if it's in a place where it could be loaded as a module (use Foo;) then it's not in a place where it could be called as a script.
create a module Foo.pm in the usual place. write a small foo wrapper script to put in the OS's search path.
this doesn't stop you from placing the script code in the module. infact it's probably wise to do so.
i can't see a way around having two files when you want to be able to do 'foo "blah"' from the command line and 'use Foo;' in perl.
In reply to Re: Possible to have a module act as a standalone??