← Index
Performance Profile   « block view • line view • sub view »
For /wise/base/deliv/dev/bin/framedepth
  Run on Fri May 28 15:23:26 2010
Reported on Fri May 28 15:26:22 2010

File/wise/base/static/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/Clone.pm
Statements Executed18
Total Time0.000211 seconds

Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2123.5e-53.5e-5Clone::bootstrap (xsub)
2122.4e-52.4e-5Clone::clone (xsub)
00000Clone::BEGIN

LineStmts.Exclusive
Time
Avg.Code
1# $Id: Clone.pm,v 0.28 2007-10-15 04:52:42 ray Exp $
2package Clone;
3
434.3e-51.4e-5use strict;
# spent 13µs making 1 call to strict::import
534.7e-51.6e-5use Carp;
# spent 88µs making 1 call to Exporter::import
637.4e-52.5e-5use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
# spent 87µs making 1 call to vars::import
7
811.0e-61.0e-6require Exporter;
911.0e-61.0e-6require DynaLoader;
1011.0e-61.0e-6require AutoLoader;
11
1211.2e-51.2e-5@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.
1611.0e-61.0e-6@EXPORT = qw();
1711.0e-61.0e-6@EXPORT_OK = qw( clone );
18
1911.0e-61.0e-6$VERSION = '0.28';
20
2112.1e-52.1e-5bootstrap Clone $VERSION;
# spent 1.64ms 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
2718.0e-68.0e-61;
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 35µs within Clone::bootstrap which was called # once (35µs+0) by DynaLoader::bootstrap at line 226 of /opt/wise/lib/perl5/5.10.0/x86_64-linux-thread-multi/DynaLoader.pm
sub Clone::bootstrap; # xsub
# spent 24µs within Clone::clone which was called # once (24µs+0) by WISE::Pars::new at line 43 of /wise/base/deliv/dev/lib/perl/WISE/Pars.pm
sub Clone::clone; # xsub