Profile of /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Method/Required.pm

← 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:23:18 2010

File | /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Method/Required.pm
Statements Executed | 23
Statement Execution Time | 255µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
3 | 2 | 1 | 21µs | 230µs | Moose::Meta::Role::Method::Required::::newMoose::Meta::Role::Method::Required::new
1 | 1 | 1 | 17µs | 63µs | Moose::Meta::Role::Method::Required::::BEGIN@8Moose::Meta::Role::Method::Required::BEGIN@8
1 | 1 | 1 | 15µs | 18µs | Moose::Meta::Role::Method::Required::::BEGIN@4Moose::Meta::Role::Method::Required::BEGIN@4
1 | 1 | 1 | 7µs | 16µs | Moose::Meta::Role::Method::Required::::BEGIN@5Moose::Meta::Role::Method::Required::BEGIN@5
1 | 1 | 1 | 7µs | 49µs | Moose::Meta::Role::Method::Required::::BEGIN@11Moose::Meta::Role::Method::Required::BEGIN@11
1 | 1 | 1 | 6µs | 100µs | Moose::Meta::Role::Method::Required::::BEGIN@6Moose::Meta::Role::Method::Required::BEGIN@6
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Method::Required::::__ANON__[:8]Moose::Meta::Role::Method::Required::__ANON__[:8]

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  |
2 |  |  |  |  | package Moose::Meta::Role::Method::Required;
3 |  |  |  |  |
4 | 3 | 26µs | 2 | 20µs | # spent 18µs (15+3) within Moose::Meta::Role::Method::Required::BEGIN@4 which was called # once (15µs+3µs) by Moose::Meta::Role::BEGIN@19 at line 4 use strict; # spent 18µs making 1 call to Moose::Meta::Role::Method::Required::BEGIN@4 # spent 3µs making 1 call to strict::import
5 | 3 | 18µs | 2 | 25µs | # spent 16µs (7+9) within Moose::Meta::Role::Method::Required::BEGIN@5 which was called # once (7µs+9µs) by Moose::Meta::Role::BEGIN@19 at line 5 use warnings; # spent 16µs making 1 call to Moose::Meta::Role::Method::Required::BEGIN@5 # spent 9µs making 1 call to warnings::import
6 | 3 | 48µs | 2 | 195µs | # spent 100µs (6+95) within Moose::Meta::Role::Method::Required::BEGIN@6 which was called # once (6µs+95µs) by Moose::Meta::Role::BEGIN@19 at line 6 use metaclass; # spent 100µs making 1 call to Moose::Meta::Role::Method::Required::BEGIN@6 # spent 95µs making 1 call to metaclass::import
7 |  |  |  |  |
8 |  |  |  |  | # spent 63µs (17+45) within Moose::Meta::Role::Method::Required::BEGIN@8 which was called # once (17µs+45µs) by Moose::Meta::Role::BEGIN@19 at line 9 use overload '""' => sub { shift->name }, # stringify to method name
9 | 3 | 30µs | 2 | 108µs | fallback => 1; # spent 63µs making 1 call to Moose::Meta::Role::Method::Required::BEGIN@8 # spent 45µs making 1 call to overload::import
10 |  |  |  |  |
11 | 3 | 84µs | 2 | 91µs | # spent 49µs (7+42) within Moose::Meta::Role::Method::Required::BEGIN@11 which was called # once (7µs+42µs) by Moose::Meta::Role::BEGIN@19 at line 11 use base qw(Class::MOP::Object); # spent 49µs making 1 call to Moose::Meta::Role::Method::Required::BEGIN@11 # spent 42µs making 1 call to base::import
12 |  |  |  |  |
13 | 1 | 600ns |  |  | our $VERSION = '0.98';
14 | 1 | 14µs |  |  | $VERSION = eval $VERSION;
15 | 1 | 300ns |  |  | our $AUTHORITY = 'cpan:STEVAN';
16 |  |  |  |  |
17 |  |  |  |  | # This is not a Moose::Meta::Role::Method because it has no implementation, it
18 |  |  |  |  | # is just a name
19 |  |  |  |  |
20 | 1 | 3µs | 2 | 390µs | __PACKAGE__->meta->add_attribute('name' => ( # spent 372µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 17µs making 1 call to Moose::Meta::Role::Method::Required::meta
21 |  |  |  |  | reader => 'name',
22 |  |  |  |  | required => 1,
23 |  |  |  |  | ));
24 |  |  |  |  |
25 | 3 | 17µs | 3 | 209µs | # spent 230µs (21+209) within Moose::Meta::Role::Method::Required::new which was called 3 times, avg 77µs/call: # 2 times (13µs+108µs) by Moose::Meta::Role::add_required_methods at line 215 of Moose/Meta/Role.pm, avg 61µs/call # once (7µs+101µs) by Moose::Meta::Role::add_conflicting_method at line 232 of Moose/Meta/Role.pm sub new { shift->_new(@_) } # spent 109µs making 2 calls to Moose::Meta::Role::Method::Required::_new, avg 54µs/call # spent 101µs making 1 call to Moose::Meta::Role::Method::Conflicting::_new
26 |  |  |  |  |
27 | 1 | 14µs |  |  | 1;
28 |  |  |  |  |
29 |  |  |  |  | __END__
30 |  |  |  |  |
31 |  |  |  |  | =pod
32 |  |  |  |  |
33 |  |  |  |  | =head1 NAME
34 |  |  |  |  |
35 |  |  |  |  | Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
36 |  |  |  |  |
37 |  |  |  |  | =head1 DESCRIPTION
38 |  |  |  |  |
39 |  |  |  |  | =head1 INHERITANCE
40 |  |  |  |  |
41 |  |  |  |  | C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
42 |  |  |  |  | It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
43 |  |  |  |  | provide an implementation of the method.
44 |  |  |  |  |
45 |  |  |  |  | =head1 METHODS
46 |  |  |  |  |
47 |  |  |  |  | =over 4
48 |  |  |  |  |
49 |  |  |  |  | =item B<< Moose::Meta::Role::Method::Required->new(%options) >>
50 |  |  |  |  |
51 |  |  |  |  | This creates a new type constraint based on the provided C<%options>:
52 |  |  |  |  |
53 |  |  |  |  | =over 8
54 |  |  |  |  |
55 |  |  |  |  | =item * name
56 |  |  |  |  |
57 |  |  |  |  | The method name. This is required.
58 |  |  |  |  |
59 |  |  |  |  | =back
60 |  |  |  |  |
61 |  |  |  |  | =item B<< $method->name >>
62 |  |  |  |  |
63 |  |  |  |  | Returns the required method's name, as provided to the constructor.
64 |  |  |  |  |
65 |  |  |  |  | =back
66 |  |  |  |  |
67 |  |  |  |  | =head1 BUGS
68 |  |  |  |  |
69 |  |  |  |  | See L<Moose/BUGS> for details on reporting bugs.
70 |  |  |  |  |
71 |  |  |  |  | =head1 AUTHOR
72 |  |  |  |  |
73 |  |  |  |  | Stevan Little E<lt>stevan@iinteractive.comE<gt>
74 |  |  |  |  |
75 |  |  |  |  | =head1 COPYRIGHT AND LICENSE
76 |  |  |  |  |
77 |  |  |  |  | Copyright 2006-2010 by Infinity Interactive, Inc.
78 |  |  |  |  |
79 |  |  |  |  | L<http://www.iinteractive.com>
80 |  |  |  |  |
81 |  |  |  |  | This library is free software; you can redistribute it and/or modify
82 |  |  |  |  | it under the same terms as Perl itself.
83 |  |  |  |  |
84 |  |  |  |  | =cut