Subject: | server() method uses @ARGV instead of @_ |
Hi,
I'm evualating Pod::POM::Web at the moment, and tried the one-liner
listed in the documentation:
perl -MPod::POM::Web -e 'Pod::POM::Web->server'
Since port 8080 is already used on my system, I wrote this instead:
perl -MPod::POM::Web -e 'Pod::POM::Web->server( 8082 )'
which fails with the error "could not start daemon".
After looking more closely at the code of the server() method,
I found out that it does :
my $port = @ARGV[0] || 8080;
instead of
my $port = @_[0] || 8080;
So, the command-line I needed to type was really:
perl -MPod::POM::Web -e 'Pod::POM::Web->server' 8082
I find that using @ARGV creates an effect at a distance, when the
behaviour of this subroutine should really only depend on its
parameters.
-- BooK