[San-Diego-pm] Detect invocation method?

Brian Manning elspicyjack at gmail.com
Fri Dec 10 11:31:52 PST 2010


2010/12/10 Reuben Settergren <ruberad at gmail.com>:
> Is there any way to package up a perl script (or .bat?) such that input
> file(s) can be selected with the mouse, and dragged into the icon for the
> script, so that the script would then run with the (full?) paths to the
> selected files as its command-line arguments? (This is a mac paradigm,
> right? I've never seen this on windoze or unix)

I don't know what Perl on Windows (it sounds like that's what you're
using) does with files that are dropped onto Perl scripts; I guess it
would be up to your Perl distribution and how it installs itself into
Windows, i.e. what shell hooks it adds when it installs, and not a
function of Perl itself.

That being said, I also found [1], which is a module for handling
dropped files.  If you're looking to package up your scripts into a
standalone binary, look at PAR [2].

Thanks,

Brian

[1] http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=dropfiles
[2] http://search.cpan.org/perldoc?PAR


More information about the San-Diego-pm mailing list