NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Thursday March 06, 2008
11:56 AM
More CPAN.pm silliness
The author used the regex snippet
/(?!\n)\Z/ 17 times in the main source, instead of the simpler and equivalent
/\z/.
From perlre:
- \Z
- Match only at end of string, or before newline at the end
- \z
- Match only at end of string
Duh? In a core module? Doesn't anybody but the maintainers ever check what goes into a core module?
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
yes (Score:1)
Because it's open sourced software, you were able to find this code that you don't like and complain about it. You're also able to produce and send in a patch, which I'm sure you did. You're also able to watch p5 changesets and notice changes or checkin
rjbs
5.004 (Score:1)
And you looked into perl5005delta:
Young whipper snapper! (Score:2)
Even now CPAN.pm attempts to maintain 5.004 compatibility, so no \z.
Think about things in context a bit, that code is over 12 years old. See for yourself [cpan.org].
Check what? (Score:2)
Check what? What exactly would you like these notional code-checkers to check for? Do you have some sort of list of coding standards that all core modules should adhere to? Where can we find it? Where did the list of coding standards come from?
--
xoa