File: get_set_hi.110.todo

package info (click to toggle)
libclass-makemethods-perl 1.01-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,944 kB
  • sloc: perl: 10,495; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/local/bin/perl

# Tests for interaction of get_set with new_hash_init

package Person;

use Class::MakeMethods::Emulator::MethodMaker
  new_hash_init =>      'new' ,
  get_set       => [ -java   => 'Status',
                     -eiffel => 'size', 'name', ]
  ;

package main;

my $p = Person->new(name   =>'Homer',
                    size   =>'54', 
                    Status =>'Comical Moron');

BEGIN { unshift @INC, ( $0 =~ /\A(.*?)[\w\.]+\z/ )[0] }
use Test;

TEST { 1 };
TEST { $p->name eq 'Homer'          };
TEST { $p->size == 54               };
TEST { $p->getStatus eq 'Comical Moron' };

exit 0;