Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 14636
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: thaljef [...] cpan.org
Requestors: itub [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06
Fixed in: 0.07



Subject: StringyGrep and StringyMap
What's up with StringyGrep and StringyMap ? As far as I know such a thing doesn't exist. You should probably looking for what should be called "ExpressionGrep" and "ExpressionMap", such as: @b = map $_*2, @a; @b = grep /xyz/, @a; A "stringy" grep such as @b = grep "/xyz/", @a; is just a particular case where the expression happens to be a string, which is most likely always true and most likely a bug. But if I understand correctly you are not looking for bugs, but for style issues...
You're absolutely right. I was probably thinking about the "StringyEval" at the time. I'll probably change this to "RequireBlockGrep" and "RequireBlockMap". Thanks for submitting this. -Jeff [guest - Sun Sep 18 11:03:38 2005]: Show quoted text
> What's up with StringyGrep and StringyMap ? As far as I know such a > thing doesn't exist. You should probably looking for what should
be Show quoted text
> called "ExpressionGrep" and "ExpressionMap", such as: > > @b = map $_*2, @a; > @b = grep /xyz/, @a; > > A "stringy" grep such as > > @b = grep "/xyz/", @a; > > is just a particular case where the expression happens to be a
string, Show quoted text
> which is most likely always true and most likely a bug. But if I > understand correctly you are not looking for bugs, but for style > issues...