Mercurial > pub > Impl
annotate _test/temp.pl @ 427:09e0086a82a7 ref20150831 tip
Merge
author | cin |
---|---|
date | Tue, 15 May 2018 00:51:33 +0300 |
parents | eed50c01e758 c27434cdd611 |
children |
rev | line source |
---|---|
210 | 1 #!/usr/bin/perl |
2 use strict; | |
423 | 3 use v5.10; |
412 | 4 use Carp; |
5 use Time::HiRes qw(gettimeofday tv_interval); | |
415 | 6 use Scalar::Util qw(blessed refaddr); |
418 | 7 use YAML::XS qw(Dump Load); |
422
b0481c071bea
IMPL::Config::Container tests, YAMLConfiguration now works and tested
cin
parents:
419
diff
changeset
|
8 use Data::Dumper; |
b0481c071bea
IMPL::Config::Container tests, YAMLConfiguration now works and tested
cin
parents:
419
diff
changeset
|
9 use URI; |
418 | 10 |
423 | 11 package Foo; |
424 | 12 use base qw(IMPL::Object::_Base); |
417 | 13 |
424 | 14 sub new { |
15 my $instance = bless {}, shift; | |
425 | 16 $instance->__construct(@_); |
424 | 17 return $instance; |
423 | 18 } |
19 | |
20 sub CTOR { | |
425 | 21 say "Foo @_"; |
423 | 22 } |
23 | |
424 | 24 package Foo2; |
25 use base qw(Foo); | |
26 | |
27 sub CTOR { | |
425 | 28 say "Foo2 @_"; |
29 } | |
30 | |
31 package Bar; | |
32 | |
33 sub CTOR { | |
34 say "Bar"; | |
35 } | |
36 | |
37 package Baz; | |
38 use base qw(Foo2 Bar); | |
39 | |
40 sub CTOR { | |
41 say "Baz"; | |
42 } | |
43 | |
44 | |
423 | 45 |
424 | 46 package main; |
47 | |
48 my $t = [gettimeofday]; | |
49 | |
425 | 50 new Baz("-hi!"); |
423 | 51 |
424 | 52 say tv_interval($t); |
422
b0481c071bea
IMPL::Config::Container tests, YAMLConfiguration now works and tested
cin
parents:
419
diff
changeset
|
53 |
407 | 54 1; |