comparison _test/object.t @ 2:78cd38551534

in develop
author Sergey
date Mon, 10 Aug 2009 17:39:08 +0400
parents 03e58a454b20
children 2e546a5175dd
comparison
equal deleted inserted replaced
1:3b418b134d8c 2:78cd38551534
5 package Foo; 5 package Foo;
6 use base qw(IMPL::Object); 6 use base qw(IMPL::Object);
7 7
8 sub CTOR { 8 sub CTOR {
9 my ($this,%args) = @_; 9 my ($this,%args) = @_;
10 print "CTOR Foo $args{Name}\n"; 10 print "CTOR Foo says $args{Name}\n";
11 } 11 }
12 12
13 sub Hello { 13 sub Hello {
14 print "Hello"; 14 print "\tHello\n";
15 } 15 }
16 16
17 package Bar; 17 package Bar;
18 use base qw(Foo); 18 use base qw(Foo);
19 19
26 package main; 26 package main;
27 27
28 my $obj = new Bar ( Name => 'Tom') ; 28 my $obj = new Bar ( Name => 'Tom') ;
29 29
30 Hello $obj; 30 Hello $obj;
31
32 no strict 'refs';
33 print "$_\n" foreach sort keys %{'Bar::'};