File | /usr/local/lib/perl5/site_perl/5.10.1/MooseX/AttributeHelpers/Collection/Hash.pm |
Statements Executed | 13 |
Statement Execution Time | 170µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 16µs | 2.41ms | BEGIN@3 | MooseX::AttributeHelpers::Collection::Hash::
1 | 1 | 1 | 8µs | 107µs | BEGIN@12 | MooseX::AttributeHelpers::Collection::Hash::
1 | 1 | 1 | 2µs | 2µs | register_implementation | Moose::Meta::Attribute::Custom::Collection::Hash::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package MooseX::AttributeHelpers::Collection::Hash; | ||||
3 | 3 | 68µs | 2 | 4.80ms | # spent 2.41ms (16µs+2.39) within MooseX::AttributeHelpers::Collection::Hash::BEGIN@3 which was called
# once (16µs+2.39ms) by MooseX::AttributeHelpers::BEGIN@29 at line 3 # spent 2.41ms making 1 call to MooseX::AttributeHelpers::Collection::Hash::BEGIN@3
# spent 2.39ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:389] |
4 | |||||
5 | 1 | 600ns | our $VERSION = '0.23'; | ||
6 | 1 | 15µs | $VERSION = eval $VERSION; | ||
7 | 1 | 300ns | our $AUTHORITY = 'cpan:STEVAN'; | ||
8 | |||||
9 | 1 | 2µs | 1 | 377µs | extends 'Moose::Meta::Attribute'; # spent 377µs making 1 call to Moose::extends |
10 | 1 | 2µs | 1 | 8.31ms | with 'MooseX::AttributeHelpers::Trait::Collection::Hash'; # spent 8.31ms making 1 call to Moose::with |
11 | |||||
12 | 3 | 61µs | 2 | 206µs | # spent 107µs (8+99) within MooseX::AttributeHelpers::Collection::Hash::BEGIN@12 which was called
# once (8µs+99µs) by MooseX::AttributeHelpers::BEGIN@29 at line 12 # spent 107µs making 1 call to MooseX::AttributeHelpers::Collection::Hash::BEGIN@12
# spent 99µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:478] |
13 | |||||
14 | # register the alias ... | ||||
15 | package # hide me from search.cpan.org | ||||
16 | Moose::Meta::Attribute::Custom::Collection::Hash; | ||||
17 | 1 | 3µs | # spent 2µs within Moose::Meta::Attribute::Custom::Collection::Hash::register_implementation which was called
# once (2µs+0s) by Moose::Util::resolve_metaclass_alias at line 192 of Moose/Util.pm | ||
18 | |||||
19 | |||||
20 | 1 | 18µs | 1; | ||
21 | |||||
22 | __END__ | ||||
23 | |||||
24 | =pod | ||||
25 | |||||
26 | =head1 NAME | ||||
27 | |||||
28 | MooseX::AttributeHelpers::Collection::Hash | ||||
29 | |||||
30 | =head1 SYNOPSIS | ||||
31 | |||||
32 | package Stuff; | ||||
33 | use Moose; | ||||
34 | use MooseX::AttributeHelpers; | ||||
35 | |||||
36 | has 'options' => ( | ||||
37 | metaclass => 'Collection::Hash', | ||||
38 | is => 'ro', | ||||
39 | isa => 'HashRef[Str]', | ||||
40 | default => sub { {} }, | ||||
41 | provides => { | ||||
42 | 'set' => 'set_option', | ||||
43 | 'get' => 'get_option', | ||||
44 | 'empty' => 'has_options', | ||||
45 | 'count' => 'num_options', | ||||
46 | 'delete' => 'delete_option', | ||||
47 | } | ||||
48 | ); | ||||
49 | |||||
50 | =head1 DESCRIPTION | ||||
51 | |||||
52 | This module provides a Hash attribute which provides a number of | ||||
53 | hash-like operations. See L<MooseX::AttributeHelpers::MethodProvider::Hash> | ||||
54 | for more details. | ||||
55 | |||||
56 | =head1 METHODS | ||||
57 | |||||
58 | =over 4 | ||||
59 | |||||
60 | =item B<meta> | ||||
61 | |||||
62 | =item B<method_provider> | ||||
63 | |||||
64 | =item B<has_method_provider> | ||||
65 | |||||
66 | =item B<helper_type> | ||||
67 | |||||
68 | =back | ||||
69 | |||||
70 | =head1 BUGS | ||||
71 | |||||
72 | All complex software has bugs lurking in it, and this module is no | ||||
73 | exception. If you find a bug please either email me, or add the bug | ||||
74 | to cpan-RT. | ||||
75 | |||||
76 | =head1 AUTHOR | ||||
77 | |||||
78 | Stevan Little E<lt>stevan@iinteractive.comE<gt> | ||||
79 | |||||
80 | =head1 COPYRIGHT AND LICENSE | ||||
81 | |||||
82 | Copyright 2007-2009 by Infinity Interactive, Inc. | ||||
83 | |||||
84 | L<http://www.iinteractive.com> | ||||
85 | |||||
86 | This library is free software; you can redistribute it and/or modify | ||||
87 | it under the same terms as Perl itself. | ||||
88 | |||||
89 | =cut |