The attached script cannot be run in the src/pmc/ directory, because
it adds "." to @INC, and then does "use Parrot::Distribution;" which
eventually (via lib/Pod/Simple.pm) does "use integer;". This confuses
Perl horribly, because it picks up "./integer.pmc" instead of the
built-in pragma, since (as we all know) ".pmc" is Perl5-speak for
"compiled Perl module" (even though such things do not really exist),
and "use lib" puts "." ahead of the build-in libraries. Boom.
Lest anyone conclude that this is totally academic, I noticed this
while testing the Emacs interface to the check-coding-stds.pl script,
which attempts to run coding standards tests with the same working
directory as that of the source file. So for src/pmc/multisub.pmc, it
tries something equivalent to this:
cd src/pmc
perl ../../t/codingstd/fixme.t multisub.pmc
which fails in just this bizarre manner because it does
use lib qw( . lib ../lib ../../lib );
and then uses Parrot::Distribution, which gets us to the "use integer"
problem.
So, is this worth fixing? Presumably, dropping the "." should be
sufficient. WDOT?
-- Bob Rogers
http://rgrjr.dyndns.org/
#! perl
use lib qw(. ../../lib );
use Parrot::Distribution;
print "Win.\n";