view _test/object.t @ 2:78cd38551534

in develop
author Sergey
date Mon, 10 Aug 2009 17:39:08 +0400
parents 03e58a454b20
children 2e546a5175dd
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 says $args{Name}\n";
}

sub Hello {
    print "\tHello\n";
}

package Bar;
use base qw(Foo);

__PACKAGE__->PassThroughArgs;

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

package main;

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

Hello $obj;