develooper Front page | perl.perl5.porters | Postings from February 2012


Thread Next
Tom Christiansen
February 27, 2012 05:23
Message ID:
Is there some reason why say() wasn't made a weak 
keywork the way lock is?  That way, if the user already
had a function by that name, we would not override their
version, but if they didn't, then they'd get Perl's.

In particular, this "error" message:

    $ perl -e 'say "hello there"'
    String found where operator expected at -e line 1, near "say "hello there""
	    (Do you need to predeclare say?)
    syntax error at -e line 1, near "say "hello there""
    Execution of -e aborted due to compilation errors.
    Exit 255

Seems really stupid.  Since it knows what to do, why doesn't
it just do it?


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About