gjh has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Okay first of all I'm still a newbie with Perl.
I'm having a problem with Carp on ActivePerl 5.8.7/8 and
dual core or multiprocessor Win32 (2000/xp/2003) systems.
The following is a short reproducer.
The reference to @ARGV rather than @_ in 'main' is required for Getopt::Long::GetOptions.
Can I pass @ARGV ?, seems to work on a uniprocessor, Can I fool GetOptions to operate on @_, or can't we test this code :-?
Thanks for any advice
gjh
When executed, it gives:use Carp; my_main(@ARGV); sub my_main { my $first = shift @ARGV; carp "Rubbish\n"; exit; }
The code is written this way for unit testing, the real module starts with the line : main (@ARGV) unless caller();$ argv 1 Bizarre copy of ARRAY in sassign at C:/progfile/Perl-5.8.8/lib/Carp/He +avy.pm line 45.
The reference to @ARGV rather than @_ in 'main' is required for Getopt::Long::GetOptions.
Can I pass @ARGV ?, seems to work on a uniprocessor, Can I fool GetOptions to operate on @_, or can't we test this code :-?
Thanks for any advice
gjh
Back to
Seekers of Perl Wisdom