Mercurial > pub > Impl
annotate _test/object.t @ 2:78cd38551534
in develop
author | Sergey |
---|---|
date | Mon, 10 Aug 2009 17:39:08 +0400 |
parents | 03e58a454b20 |
children | 2e546a5175dd |
rev | line source |
---|---|
0 | 1 #!/usr/bin/perl -w |
2 use strict; | |
3 use lib '../Lib'; | |
4 | |
5 package Foo; | |
6 use base qw(IMPL::Object); | |
7 | |
8 sub CTOR { | |
9 my ($this,%args) = @_; | |
2 | 10 print "CTOR Foo says $args{Name}\n"; |
0 | 11 } |
12 | |
13 sub Hello { | |
2 | 14 print "\tHello\n"; |
0 | 15 } |
16 | |
17 package Bar; | |
18 use base qw(Foo); | |
19 | |
20 __PACKAGE__->PassThroughArgs; | |
21 | |
22 sub CTOR { | |
23 print "CTOR Bar\n"; | |
24 } | |
25 | |
26 package main; | |
27 | |
28 my $obj = new Bar ( Name => 'Tom') ; | |
29 | |
2 | 30 Hello $obj; |