dtRdr::Traits::Class

dtRdr::Traits::Class is a Perl module with shared OO stuff.
Download

dtRdr::Traits::Class Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Eric Wilhelm
  • Publisher web site:
  • http://search.cpan.org/~ewilhelm/dotReader-v0.11.2/lib/MultiTask/Minion.pm

dtRdr::Traits::Class Tags


dtRdr::Traits::Class Description

dtRdr::Traits::Class is a Perl module with shared OO stuff. dtRdr::Traits::Class is a Perl module with shared OO stuff.Methods to Break ThingsNOT_IMPLEMENTEDImported into base class. Gives a nicer message than the standard "Can't locate method...", indicating that you did not typo the method name, but instead forgot to override it. sub virtual_method {my $self = shift; $self->NOT_IMPLEMENTED(@_);}Is the shorter, less readable version worthwhile? sub virtual_method { $_->NOT_IMPLEMENTED(@_);}This should be safe for subclasses to override and/or call as ->SUPER::. This gives you something like an AUTOLOAD (though you would have to get (caller(1)) yourself) without having to also do can(), but that's untested...WARN_NOT_IMPLEMENTEDSame as NOT_IMPLEMENTED(), but just a warning. Returns undef. $self->WARN_NOT_IMPLEMENTED;Class HoppingclaimAssumes a hash-based object. Creates a copy (with only one level of dereference) and blesses it into Package. $object = Package->claim($object); Requirements: · Perl


dtRdr::Traits::Class Related Software