Mercurial > pub > Impl
view _test/temp.pl @ 424:87af445663d7 ref20150831
IMPL::Object::_Base
author | cin |
---|---|
date | Tue, 03 Apr 2018 10:54:09 +0300 |
parents | 60c2892a577c |
children | c27434cdd611 eed50c01e758 |
line wrap: on
line source
#!/usr/bin/perl use strict; use v5.10; use Carp; use Time::HiRes qw(gettimeofday tv_interval); use Scalar::Util qw(blessed refaddr); use YAML::XS qw(Dump Load); use Data::Dumper; use URI; package Bar; use base qw(IMPL::Object); sub CTOR { } package Bar2; use base qw(Bar); sub CTOR { } package Foo; use base qw(IMPL::Object::_Base); sub new { my $instance = bless {}, shift; $instance->__construct(); return $instance; } sub CTOR { } package Foo2; use base qw(Foo); sub CTOR { } package main; my $t = [gettimeofday]; for(my $i=0; $i <1000000; $i++) { my $v = new Bar2; } say tv_interval($t); 1;