← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:43 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Clone.pm
Statements Executed 18
Statement Execution Time 170µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1912207µs207µsClone::::cloneClone::clone (xsub)
11252µs52µsClone::::bootstrapClone::bootstrap (xsub)
11116µs21µsClone::::BEGIN@4Clone::BEGIN@4
1119µs54µsClone::::BEGIN@5Clone::BEGIN@5
1118µs77µsClone::::BEGIN@6Clone::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# $Id: Clone.pm,v 0.31 2009/01/20 04:54:37 ray Exp $
2package Clone;
3
4323µs226µs
# spent 21µs (16+5) within Clone::BEGIN@4 which was called # once (16µs+5µs) by SimpleDB::Class::SQL::BEGIN@21 at line 4
use strict;
# spent 21µs making 1 call to Clone::BEGIN@4 # spent 5µs making 1 call to strict::import
5336µs299µs
# spent 54µs (9+45) within Clone::BEGIN@5 which was called # once (9µs+45µs) by SimpleDB::Class::SQL::BEGIN@21 at line 5
use Carp;
# spent 54µs making 1 call to Clone::BEGIN@5 # spent 45µs making 1 call to Exporter::import
6376µs2146µs
# spent 77µs (8+69) within Clone::BEGIN@6 which was called # once (8µs+69µs) by SimpleDB::Class::SQL::BEGIN@21 at line 6
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
# spent 77µs making 1 call to Clone::BEGIN@6 # spent 69µs making 1 call to vars::import
7
81700nsrequire Exporter;
91500nsrequire DynaLoader;
101400nsrequire AutoLoader;
11
12112µs@ISA = qw(Exporter DynaLoader);
13# Items to export into callers namespace by default. Note: do not export
14# names by default without a very good reason. Use EXPORT_OK instead.
15# Do not simply export all your public functions/methods/constants.
161200ns@EXPORT = qw();
171400ns@EXPORT_OK = qw( clone );
18
191300ns$VERSION = '0.31';
20
2116µs1386µsbootstrap Clone $VERSION;
# spent 386µs making 1 call to DynaLoader::bootstrap
22
23# Preloaded methods go here.
24
25# Autoload methods go after =cut, and are processed by the autosplit program.
26
27114µs1;
28__END__
29
30=head1 NAME
31
32Clone - recursively copy Perl datatypes
33
34=head1 SYNOPSIS
35
36 use Clone;
37
38 push @Foo::ISA, 'Clone';
39
40 $a = new Foo;
41 $b = $a->clone();
42
43 # or
44
45 use Clone qw(clone);
46
47 $a = { 'foo' => 'bar', 'move' => 'zig' };
48 $b = [ 'alpha', 'beta', 'gamma', 'vlissides' ];
49 $c = new Foo();
50
51 $d = clone($a);
52 $e = clone($b);
53 $f = clone($c);
54
55=head1 DESCRIPTION
56
57This module provides a clone() method which makes recursive
58copies of nested hash, array, scalar and reference types,
59including tied variables and objects.
60
61
62clone() takes a scalar argument and an optional parameter that
63can be used to limit the depth of the copy. To duplicate lists,
64arrays or hashes, pass them in by reference. e.g.
65
66 my $copy = clone (\@array);
67
68 # or
69
70 my %copy = %{ clone (\%hash) };
71
72
73For a slower, but more flexible solution see Storable's dclone().
74
75=head1 AUTHOR
76
77Ray Finch, rdf@cpan.org
78
79Copyright 2001 Ray Finch.
80
81This module is free software; you can redistribute it and/or
82modify it under the same terms as Perl itself.
83
84=head1 SEE ALSO
85
86Storable(3).
87
88=cut
# spent 52µs within Clone::bootstrap which was called # once (52µs+0s) by DynaLoader::bootstrap at line 227 of DynaLoader.pm
sub Clone::bootstrap; # xsub
# spent 207µs within Clone::clone which was called 19 times, avg 11µs/call: # 19 times (207µs+0s) by SimpleDB::Class::SQL::to_sql at line 369 of ../lib/SimpleDB/Class/SQL.pm, avg 11µs/call
sub Clone::clone; # xsub