Devel::PL_origargv - access to the Perl interpreter's argv
my @PL_origargv = Devel::PL_origargv->get;
If Perl is run with the following command:
perl -w -Ilib yourscript.pl arg1 arg2
Then @ARGV will be pre-populated with arg1 and arg2, and $0 will reflect the name of your script, but there's no way to access -w or -Ilib.
@ARGV
arg1
arg2
$0
-w
-Ilib
This module provides one class method that returns Perl's original argv array as a list.
get
Returns argv as a list of strings. If called in scalar context, returns argc (i.e. the count of argv).
This module's test suite will not pass when run via forkprove. Use the standard prove instead.
forkprove
prove
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Devel-PL_origargv.
https://metacpan.org/source/RGARCIA/perl-5.6.2/perl.c#L856
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2012-2014 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install Devel::PL_origargv, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::PL_origargv
CPAN shell
perl -MCPAN -e shell install Devel::PL_origargv
For more information on module installation, please visit the detailed CPAN module installation guide.