Skip Menu |

This queue is for tickets about the List-Maker CPAN distribution.

Report information
The Basics
Id: 27286
Status: resolved
Priority: 0/
Queue: List-Maker

People
Owner: Nobody in particular
Requestors: schwigon [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: v0.0.3
Fixed in: v0.0.5



Subject: Globally breaks all other file globbing
Hi! I suggest moving the File::Maker module below the Acme:: namespace. Globally hijacking the file globbing syntax does way too strong interfere with other modules. See my attached example which uses another modules sub to get a file list. The calling code can't know that a use'd module uses the globbing operator and the used module can't know that the operator ist hijacked. I know that this bug is probably not fixable, which is a pity because the provided syntax is very nice. Therefore I want it to survive, but in another namespace: Acme. GreetinX Steffen -- Steffen Schwigon <schwigon@webit.de> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: bad_list_maker.pl
use lib "."; use MyFileList; #use List::Maker; print <foo bar - example>, "\n"; # soll Liste aller *.pl Files auflisten, also z.B. sich selbst # ("bad_list_maker.pl"). Geht nicht mehr, sobald oben List::Maker # ge'use'd wird. print MyFileList::file_list(), "\n";
Subject: MyFileList.pm
package MyFileList; sub file_list { return <*.pl>; } 1;
Subject: Re: [rt.cpan.org #27286] Globally breaks all other file globbing
Date: Sun, 27 May 2007 17:23:56 +1000
To: bug-List-Maker [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Steffen Schwigon via RT wrote: Show quoted text
> I suggest moving the File::Maker module below the Acme:: namespace. > Globally hijacking the file globbing syntax does way too strong > interfere with other modules. > > See my attached example which uses another modules sub to get a file > list. The calling code can't know that a use'd module uses the globbing > operator and the used module can't know that the operator ist hijacked. > > I know that this bug is probably not fixable, which is a pity because > the provided syntax is very nice. > > Therefore I want it to survive, but in another namespace: Acme.
But this is bad psychology! Children who misbehave in public shouldn't be hidden away; they should be educated to behave better! I have patched List::Maker for the next release, so that it only applies its magic in those files where it is explicitly loaded. That should solve the problem. Thanks for the report! Damian
From: SCHWIGON [...] cpan.org
On Sun May 27 03:24:33 2007, damian@conway.org wrote: Show quoted text
> I have patched List::Maker for the next release, so that it only > applies its magic in those files where it is explicitly loaded. > That should solve the problem.
Asked with the kindest possible mood (I know you are busy), Do you consider it worth for uploading? In return I can only offer testing and using it. :-) Greetings from Dresden, Steffen -- Steffen Schwigon <schwigon@webit.de> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: Globally breaks all other file globbing (new release, please)
From: MARKSTOS [...] cpan.org
I would count Ovid's recent blog post as another vote for moving this release along as well: http://use.perl.org/~Ovid/journal/35613 At least making the patch available *some way* would allow people to use the updated code.
For me it works with v0.0.5. I close this bug. Thanks. Regards, Steffen -- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>