ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: unless(...) terser than if(!...)
by Vincent Pit other posts by this author
Aug 29 2008 1:47PM messages near this date
Re: unless(...) terser than if(!...) | Re: unless(...) terser than if(!...)
As requested by Rafael, I added some overloading and deparse tests. I
also added a few basic tests.

While testing, I realized that the "if (!$x)" wasn't optimized if it was
the last statement of a sequence. But it's actually the good thing,
because "do { 1 unless $x }" and "do { 1 if not $x }" actually don't
return the same thing when $x is true.
Thread:
Nicholas Clark
Vincent Pit
Vincent Pit
Rafael Garcia-Suarez
Yitzchak Scott-Thoennes
Graham Barr
Nicholas Clark
David Nicol
Vincent Pit
David Nicol

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved