Class::FakeAttributes

Provide fake attributes for non-hash-based objects
Download

Class::FakeAttributes Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Smylers
  • Publisher web site:
  • http://search.cpan.org/~smylers/

Class::FakeAttributes Tags


Class::FakeAttributes Description

Provide fake attributes for non-hash-based objects Most Perl classes use hash-based objects, and subclasses can easily add more attributes (instance data) with new hash keys. But some classes are not based on hashes. A subclass of such a class can use Class::FakeAttributes to add attributes (or at least to emulate doing so).Class::FakeAttributes is a mixin Perl class: the only sensible use is to inherit from it, and it only makes sense to do that when also inheriting from something else as well.SYNOPSIS use base qw; sub something { my ($self, $whatever) = @_; $self->set_attribute(motto => $whatever); my $size = $self->get_attribute('size'); # etc Requirements: · Perl


Class::FakeAttributes Related Software