|Think about Loose Coupling|
bizarre Carpby gjh (Initiate)
|on Mar 29, 2007 at 12:04 UTC||Need Help??|
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.
When executed, it gives:
The code is written this way for unit testing, the real module starts with the line : main (@ARGV) unless caller();
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