Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 16870
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: nospam-abuse [...] bloodgate.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: Tels <nospam-abuse [...] bloodgate.com>
To: bug-PPI [...] rt.cpan.org
Subject: type() on "unless () {}" vs. "if () {}"
Date: Mon, 2 Jan 2006 19:11:46 +0100
-----BEGIN PGP SIGNED MESSAGE----- Moin, type() returns 'if' instead the expected "unless" for unless constructs as demonstrated by the attached test script (the documentation for type() also does not mention "unless" at all). This bug tripped my code up, because a flowchart for "if ...." should look fundamentally different than on for "unless ..." :-) Best wishes, Tels - -- Signed on Mon Jan 2 19:09:41 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "My other computer is your Windows box." -- Dr. Brad (19034) on 2004-08-13 at /. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iQEVAwUBQ7ls4ncLPEOTuEwVAQHoNAf+KUP16PnMX9/PpEFmHvyuFSUGeIOsxlF4 Z26Q8/cpxKlpEn9twiER0Oszr5GcHornWfD+gsP69HRuJ/tvdLHzN1IAw1XlHAL8 DJyuiMuZ00e7qVpvz0okS3923AppOtMLww/CkUv/vFvUorJIDdyla4AkSFaySoTn 9Gcnc7v/mIU+FSFMpw/YWCn/+LaToW66zOZ5elFpRIm8qNNP/D8lcIAPp+1Lcuma 9dWRQfFQDqEWhua8NqNpd+hRidtOlPQsZgiIx7rwrl4ebn/j3bcQ896BIOQCPqQV 5j6iPau1j1WVoe8+lF6bM80tbgeoObBu5dFrfKMiWGxHMgS4nsgSNg== =E+0v -----END PGP SIGNATURE-----
Download t.pl
text/x-perl 323b

Message body is not shown because sender requested not to inline it.

Date: Tue, 03 Jan 2006 10:22:25 +1100
From: Adam Kennedy <adam [...] phase-n.com>
To: bug-PPI [...] rt.cpan.org
Subject: Re: [cpan #16870] type() on "unless () {}" vs. "if () {}"
RT-Send-Cc:
Download (untitled) / with headers
text/plain 2.5k
The ->type method is most definitely indended to return 'if'. There are three forms of compound statements, 'if' types, 'for' types and err... the other one. Each form can be started by a number of keywords. From the documentation ---------------------------------------------- type The type method returns the fundamental type of the compound statement. There are three basic compound statement types. The 'if' type includes all vatiations of the if and unless statements, including any 'elsif' or 'else' parts of the compount statement. The 'while' type describes the standard while statement, but again does not describes simple statements with a trailing while. The 'for' type covers both of 'for' and 'foreach' statements. All of the compounds are a variation on one of these three. Returns the simple string 'if', 'for' or 'while', or undef if the type cannot be determined. -------------------------------------------------- Note that there is a seperate bug relating to for/foreach that you reported earlier. But that ->type only returns one of three values is intented. Adam K nospam-abuse@bloodgate.com via RT wrote: Show quoted text
> This message about PPI was sent to you by nospam-abuse@bloodgate.com <nospam-abuse@bloodgate.com> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=16870 > > > -----BEGIN PGP SIGNED MESSAGE----- > > Moin, > > type() returns 'if' instead the expected "unless" for unless constructs as > demonstrated by the attached test script (the documentation for type() > also does not mention "unless" at all). > > This bug tripped my code up, because a flowchart for "if ...." should look > fundamentally different than on for "unless ..." :-) > > Best wishes, > > Tels > > - -- > Signed on Mon Jan 2 19:09:41 2006 with key 0x93B84C15. > Visit my photo gallery at http://bloodgate.com/photos/ > PGP key on http://bloodgate.com/tels.asc or per email. > > "My other computer is your Windows box." -- Dr. Brad (19034) on > 2004-08-13 at /. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iQEVAwUBQ7ls4ncLPEOTuEwVAQHoNAf+KUP16PnMX9/PpEFmHvyuFSUGeIOsxlF4 > Z26Q8/cpxKlpEn9twiER0Oszr5GcHornWfD+gsP69HRuJ/tvdLHzN1IAw1XlHAL8 > DJyuiMuZ00e7qVpvz0okS3923AppOtMLww/CkUv/vFvUorJIDdyla4AkSFaySoTn > 9Gcnc7v/mIU+FSFMpw/YWCn/+LaToW66zOZ5elFpRIm8qNNP/D8lcIAPp+1Lcuma > 9dWRQfFQDqEWhua8NqNpd+hRidtOlPQsZgiIx7rwrl4ebn/j3bcQ896BIOQCPqQV > 5j6iPau1j1WVoe8+lF6bM80tbgeoObBu5dFrfKMiWGxHMgS4nsgSNg== > =E+0v > -----END PGP SIGNATURE-----
Date: Tue, 03 Jan 2006 10:23:12 +1100
From: Adam Kennedy <adam [...] phase-n.com>
To: bug-PPI [...] rt.cpan.org
Subject: Re: [cpan #16870] type() on "unless () {}" vs. "if () {}"
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.5k
BTW, thanks a ton for all these bug reports. I plan to get to them weekend coming, but I'll be overloaded with $work this week after the holidays. Adam K nospam-abuse@bloodgate.com via RT wrote: Show quoted text
> This message about PPI was sent to you by nospam-abuse@bloodgate.com <nospam-abuse@bloodgate.com> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=16870 > > > -----BEGIN PGP SIGNED MESSAGE----- > > Moin, > > type() returns 'if' instead the expected "unless" for unless constructs as > demonstrated by the attached test script (the documentation for type() > also does not mention "unless" at all). > > This bug tripped my code up, because a flowchart for "if ...." should look > fundamentally different than on for "unless ..." :-) > > Best wishes, > > Tels > > - -- > Signed on Mon Jan 2 19:09:41 2006 with key 0x93B84C15. > Visit my photo gallery at http://bloodgate.com/photos/ > PGP key on http://bloodgate.com/tels.asc or per email. > > "My other computer is your Windows box." -- Dr. Brad (19034) on > 2004-08-13 at /. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iQEVAwUBQ7ls4ncLPEOTuEwVAQHoNAf+KUP16PnMX9/PpEFmHvyuFSUGeIOsxlF4 > Z26Q8/cpxKlpEn9twiER0Oszr5GcHornWfD+gsP69HRuJ/tvdLHzN1IAw1XlHAL8 > DJyuiMuZ00e7qVpvz0okS3923AppOtMLww/CkUv/vFvUorJIDdyla4AkSFaySoTn > 9Gcnc7v/mIU+FSFMpw/YWCn/+LaToW66zOZ5elFpRIm8qNNP/D8lcIAPp+1Lcuma > 9dWRQfFQDqEWhua8NqNpd+hRidtOlPQsZgiIx7rwrl4ebn/j3bcQ896BIOQCPqQV > 5j6iPau1j1WVoe8+lF6bM80tbgeoObBu5dFrfKMiWGxHMgS4nsgSNg== > =E+0v > -----END PGP SIGNATURE-----
Download (untitled) / with headers
text/plain 338b
On Mon Jan 02 18:25:37 2006, adam@phase-n.com wrote: Show quoted text
> The ->type method is most definitely indended to return 'if'. > > There are three forms of compound statements, 'if' types, 'for' types > and err... the other one. > > Each form can be started by a number of keywords.
So this is NOTABUG and this can be closed. Best wishes, Tels
Resolved


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.