develooper Front page | perl.perl5.porters | Postings from September 2003

[BUG] perl [-c] /directory

Thread Next
From:
Jos I . Boumans
Date:
September 12, 2003 04:21
Subject:
[BUG] perl [-c] /directory
Message ID:
20030912132142454+0200@nntp.perl.org
Perl does something i'm not expecting when doing the following:

	[kane@coke ~]$ perl -c /tmp
	/tmp syntax OK

	[kane@coke ~]$ perl /tmp
	[kane@coke ~]$

It seems this effectively compiles (and runs) an empty program, which 
succeeds.
However, it's a directory.

This bug is NotANewBug, as it's present in at least 5.004, but perhaps 
even further back.

I expect the fix needs to be somewhere in perl.c:S_open_script, but my 
foo is not strong enough to provide a patch alas...

Regards,
	Jos

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About