develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [PATCH] Support for 0o/0O octal strings

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
July 3, 2011 14:43
Subject:
Re: [PATCH] Support for 0o/0O octal strings
Message ID:
C1E46844-0CA5-41AA-8E52-E1B3B7B4EC9B@cpan.org
Claes Jakobsson wrote:
> Hi,
> 
> the attached patches
> 
> 1) Adds support + tests for 0o and 0O octal string constants
> 2) Adds 0o and 0O to grok_oct hence making oct() also understand the above + tests
> 3) removes the task from perltodo
> 
> /Claes

Before the patches:

$ ./miniperl -e '0or foo()'
Undefined subroutine &main::foo called at -e line 1.

After the patches:

$ ./miniperl -e '0or foo()'
Bareword found where operator expected at -e line 1, near "0or"
	(Missing operator before r?)
syntax error at -e line 1, near "0or foo"
Execution of -e aborted due to compilation errors.

Is there any way to resolve this in favour of backward compatibility? (Honestly, I don’t see what benefit this feature provides, even though it’s listed in perltodo.)


Thread Previous | 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