← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:42:38 2010
Reported on Wed Nov 17 22:04:54 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Tie/ToObject.pm
StatementsExecuted 14 statements in 782µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11174µs92µsTie::ToObject::::BEGIN@5Tie::ToObject::BEGIN@5
11157µs209µsTie::ToObject::::BEGIN@10Tie::ToObject::BEGIN@10
11138µs166µsTie::ToObject::::BEGIN@11Tie::ToObject::BEGIN@11
11136µs213µsTie::ToObject::::BEGIN@8Tie::ToObject::BEGIN@8
0000s0sTie::ToObject::::AUTOLOADTie::ToObject::AUTOLOAD
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#!/usr/bin/perl
2
3package Tie::ToObject;
4
53112µs2110µs
# spent 92µs (74+18) within Tie::ToObject::BEGIN@5 which was called: # once (74µs+18µs) by Data::Visitor::BEGIN@10 at line 5
use strict;
# spent 92µs making 1 call to Tie::ToObject::BEGIN@5 # spent 18µs making 1 call to strict::import
6#use warnings;
7
83122µs2390µs
# spent 213µs (36+177) within Tie::ToObject::BEGIN@8 which was called: # once (36µs+177µs) by Data::Visitor::BEGIN@10 at line 8
use vars qw($VERSION $AUTOLOAD);
# spent 213µs making 1 call to Tie::ToObject::BEGIN@8 # spent 177µs making 1 call to vars::import
9
103107µs2360µs
# spent 209µs (57+151) within Tie::ToObject::BEGIN@10 which was called: # once (57µs+151µs) by Data::Visitor::BEGIN@10 at line 10
use Carp qw(croak);
# spent 209µs making 1 call to Tie::ToObject::BEGIN@10 # spent 151µs making 1 call to Exporter::import
113428µs2293µs
# spent 166µs (38+127) within Tie::ToObject::BEGIN@11 which was called: # once (38µs+127µs) by Data::Visitor::BEGIN@10 at line 11
use Scalar::Util qw(blessed);
# spent 166µs making 1 call to Tie::ToObject::BEGIN@11 # spent 127µs making 1 call to Exporter::import
12
1313µs$VERSION = "0.03";
14
15sub AUTOLOAD {
16 my ( $self, $tied ) = @_;
17 my ( $method ) = ( $AUTOLOAD =~ /([^:]+)$/ );
18
19 if ( $method =~ /^TIE/ ) {
20 if ( blessed($tied) ) {
21 return $tied;
22 } else {
23 croak "You must supply an object as the argument to tie()";
24 }
25 } else {
26 croak "Unsupported method for $method, this module is only for tying to existing objects";
27 }
28}
29
30110µs__PACKAGE__
31
32__END__