PageRenderTime 50ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/Class-InsideOut-1.10/t/Object/Animal/Jackalope.pm

#
Perl | 32 lines | 22 code | 9 blank | 1 comment | 1 complexity | 493fc90e2b9bc28813519f9fa04ac62a MD5 | raw file
Possible License(s): Apache-2.0
  1. package t::Object::Animal::Jackalope;
  2. BEGIN {
  3. for ( 't::Object::Animal::Antelope', 't::Object::Animal::JackRabbit' ) {
  4. eval "require $_";
  5. push @t::Object::Animal::Jackalope::ISA, $_;
  6. }
  7. }
  8. use Class::InsideOut qw( private property id );
  9. # superclass is handling new()
  10. Class::InsideOut::options( { privacy => 'public' } );
  11. property kills => my %kills;
  12. private whiskers => my %whiskers;
  13. private sidekick => my %sidekick, { privacy => 'public' };
  14. use vars qw( $freezings $thawings );
  15. sub FREEZE {
  16. my $self = shift;
  17. $freezings++;
  18. }
  19. sub THAW {
  20. my $self = shift;
  21. $thawings++;
  22. }
  23. 1;