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

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

Thread Previous | Thread Next
Father Chrysostomos
July 3, 2011 14:43
Re: [PATCH] Support for 0o/0O octal strings
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About