view _test/object.t @ 0:03e58a454b20

Создан репозитарий
author Sergey
date Tue, 14 Jul 2009 12:54:37 +0400
parents
children 78cd38551534
line wrap: on
line source

#!/usr/bin/perl -w
use strict;
use lib '../Lib';

package Foo;
use base qw(IMPL::Object);

sub CTOR {
    my ($this,%args) = @_;
    print "CTOR Foo $args{Name}\n";
}

sub Hello {
    print "Hello";
}

package Bar;
use base qw(Foo);

__PACKAGE__->PassThroughArgs;

sub CTOR {
    print "CTOR Bar\n";
}

package main;

my $obj = new Bar ( Name => 'Tom') ;

Hello $obj;

no strict 'refs';
print "$_\n" foreach sort keys %{'Bar::'};