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: 18698
Status: resolved
Priority: 0/
Queue: Perl-Critic

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

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.15_01



Subject: Policy idea ProhibitUniversalFunctions
Since you asked for more ideas... Using UNIVERSAL::isa or UNIVERSAL::can directly is considered bad. As is C< use UNIVERSAL 'isa' or use UNIVERSAL qw{ can } > Actually, I think that second case is being deprecated. In short, they break OO and encapsulation. As alternatives, call as a method once you know they are objects, or for the lazy, see Params::Util::_INSTANCE for the normal object->isa case. (I don't have a good can replacement yet)
From: cdolan [...] cpan.org
I'll take this one. -- Chris On Thu Apr 13 08:56:40 2006, guest wrote: Show quoted text
> Since you asked for more ideas... > > Using UNIVERSAL::isa or UNIVERSAL::can directly is considered bad. > > As is C< use UNIVERSAL 'isa' or use UNIVERSAL qw{ can } > > > Actually, I think that second case is being deprecated. > > In short, they break OO and encapsulation. > > As alternatives, call as a method once you know they are objects, or for > the lazy, see Params::Util::_INSTANCE for the normal object->isa case. > > (I don't have a good can replacement yet)
From: cdolan [...] cpan.org
Resolved via SVN revision #361, viewable at the URL below. This fix will be present in the forthcoming v0.15_01. If you have any recommendations for improvements to the documentation of those policies, please pass them along. http://perlcritic.tigris.org/servlets/BrowseList?listName=commits -- Chris