Mercurial > pub > Impl
view _test/temp.pl @ 281:a8dbddf491dd
refactoring
*IMPL::declare reset abstractProps static property after implementing these props
*IMPL::Serialization: fixed bug with multiple text parts inside one node
*IMPL::Web::Handler::TTView: removed obsolete property 'location' from 'view' template variable
author | cin |
---|---|
date | Mon, 11 Feb 2013 00:58:22 +0400 |
parents | 8d36073411b1 |
children | f116cd9fe7d9 |
line wrap: on
line source
#!/usr/bin/perl use strict; { package Foo; use IMPL::declare { base => [ 'IMPL::Object::Disposable' => undef ] }; } use Time::HiRes qw(gettimeofday tv_interval); use IMPL::lang; use IMPL::require { AutoDispose => 'IMPL::Object::AutoDispose', DBSchema => 'IMPL::SQL::Schema' }; my $real = DBSchema->new( name => 'simple', version => 1); my $proxy = AutoDispose->new($real); print typeof($proxy),"\n"; my $t = [gettimeofday]; for (1..1000000) { $proxy->name; } print "proxy: ",tv_interval($t,[gettimeofday]),"\n"; $t = [gettimeofday]; for (1..1000000) { $real->name; } print "real: ",tv_interval($t,[gettimeofday]),"\n";