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