← Index
Performance Profile   « block view • line view • sub view »
For t/test-parsing
  Run on Sun Nov 14 09:49:57 2010
Reported on Sun Nov 14 09:50:07 2010

File /usr/local/lib/perl/5.10.0/Moose/Meta/Role/Method/Required.pm
Statements Executed 20
Total Time 0.0003406 seconds
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sMoose::Meta::Role::Method::Required::::BEGINMoose::Meta::Role::Method::Required::BEGIN
0000s0sMoose::Meta::Role::Method::Required::::__ANON__[:8]Moose::Meta::Role::Method::Required::__ANON__[:8]
0000s0sMoose::Meta::Role::Method::Required::::newMoose::Meta::Role::Method::Required::new
LineStmts.Exclusive
Time
Avg.Code
1
2package Moose::Meta::Role::Method::Required;
3
4332µs11µsuse strict;
# spent 10µs making 1 call to strict::import
5326µs9µsuse warnings;
# spent 28µs making 1 call to warnings::import
6378µs26µsuse metaclass;
# spent 813µs making 1 call to metaclass::import
7
8use overload '""' => sub { shift->name }, # stringify to method name
9336µs12µs fallback => 1;
# spent 56µs making 1 call to overload::import
10
113120µs40µsuse base qw(Class::MOP::Object);
# spent 81µs making 1 call to base::import
12
131700ns700nsour $VERSION = '1.15';
14122µs22µs$VERSION = eval $VERSION;
151600ns600nsour $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
20118µs18µs__PACKAGE__->meta->add_attribute('name' => (
# spent 799µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 34µs making 1 call to Moose::Meta::Role::Method::Required::meta
21 reader => 'name',
22 required => 1,
23));
24
25sub new { shift->_new(@_) }
26
2718µs8µs1;
28
29__END__
30
31=pod
32
33=head1 NAME
34
35Moose::Meta::Role::Method::Required - A Moose metaclass for required methods in Roles
36
37=head1 DESCRIPTION
38
39=head1 INHERITANCE
40
41C<Moose::Meta::Role::Method::Required> is a subclass of L<Class::MOP::Object>.
42It is B<not> a subclass of C<Moose::Meta::Role::Method> since it does not
43provide 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
51This creates a new type constraint based on the provided C<%options>:
52
53=over 8
54
55=item * name
56
57The method name. This is required.
58
59=back
60
61=item B<< $method->name >>
62
63Returns the required method's name, as provided to the constructor.
64
65=back
66
67=head1 BUGS
68
69See L<Moose/BUGS> for details on reporting bugs.
70
71=head1 AUTHOR
72
73Stevan Little E<lt>stevan@iinteractive.comE<gt>
74
75=head1 COPYRIGHT AND LICENSE
76
77Copyright 2006-2010 by Infinity Interactive, Inc.
78
79L<http://www.iinteractive.com>
80
81This library is free software; you can redistribute it and/or modify
82it under the same terms as Perl itself.
83
84=cut