| File | /usr/local/lib/perl/5.10.0/Class/MOP/Mixin.pm |
| Statements Executed | 49 |
| Total Time | 0.0003538 seconds |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Mixin::BEGIN |
| Line | Stmts. | Exclusive Time | Avg. | Code |
|---|---|---|---|---|
| 1 | package Class::MOP::Mixin; | |||
| 2 | ||||
| 3 | 3 | 22µs | 7µs | use strict; # spent 7µs making 1 call to strict::import |
| 4 | 3 | 63µs | 21µs | use warnings; # spent 21µs making 1 call to warnings::import |
| 5 | ||||
| 6 | 1 | 700ns | 700ns | our $VERSION = '1.09'; |
| 7 | 1 | 25µs | 25µs | $VERSION = eval $VERSION; |
| 8 | 1 | 9µs | 9µs | our $AUTHORITY = 'cpan:STEVAN'; |
| 9 | ||||
| 10 | 3 | 73µs | 24µs | use Scalar::Util 'blessed'; # spent 38µs making 1 call to Exporter::import |
| 11 | ||||
| 12 | sub meta { | |||
| 13 | 18 | 11µs | 628ns | require Class::MOP::Class; |
| 14 | 18 | 146µs | 8µs | Class::MOP::Class->initialize( blessed( $_[0] ) || $_[0] ); # spent 2.14ms making 18 calls to Class::MOP::Class::initialize, avg 119µs/call
# spent 47µs making 18 calls to Scalar::Util::blessed, avg 3µs/call |
| 15 | } | |||
| 16 | ||||
| 17 | 1 | 4µs | 4µs | 1; |
| 18 | ||||
| 19 | __END__ | |||
| 20 | ||||
| 21 | =pod | |||
| 22 | ||||
| 23 | =head1 NAME | |||
| 24 | ||||
| 25 | Class::MOP::Mixin - Base class for mixin classes | |||
| 26 | ||||
| 27 | =head1 DESCRIPTION | |||
| 28 | ||||
| 29 | This class provides a single method shared by all mixins | |||
| 30 | ||||
| 31 | =head1 METHODS | |||
| 32 | ||||
| 33 | This class provides a few methods which are useful in all metaclasses. | |||
| 34 | ||||
| 35 | =over 4 | |||
| 36 | ||||
| 37 | =item B<< Class::MOP::Mixin->meta >> | |||
| 38 | ||||
| 39 | This returns a L<Class::MOP::Class> object for the mixin class. | |||
| 40 | ||||
| 41 | =back | |||
| 42 | ||||
| 43 | =head1 AUTHORS | |||
| 44 | ||||
| 45 | Dave Rolsky E<lt>autarch@urth.orgE<gt> | |||
| 46 | ||||
| 47 | =head1 COPYRIGHT AND LICENSE | |||
| 48 | ||||
| 49 | Copyright 2006-2010 by Infinity Interactive, Inc. | |||
| 50 | ||||
| 51 | L<http://www.iinteractive.com> | |||
| 52 | ||||
| 53 | This library is free software; you can redistribute it and/or modify | |||
| 54 | it under the same terms as Perl itself. | |||
| 55 | ||||
| 56 | =cut |