| Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Hailo/Role/Engine.pm |
| Statements | Executed 15 statements in 333µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 71µs | 171µs | Hailo::Role::Engine::BEGIN@9 |
| 1 | 1 | 1 | 31µs | 31µs | Hailo::Role::Engine::BEGIN@2 |
| 1 | 1 | 1 | 15µs | 100µs | Hailo::Role::Engine::BEGIN@9.12 |
| 1 | 1 | 1 | 13µs | 1.42ms | Hailo::Role::Engine::BEGIN@11 |
| 1 | 1 | 1 | 13µs | 458µs | Hailo::Role::Engine::BEGIN@10 |
| 1 | 1 | 1 | 7µs | 7µs | Hailo::Role::Engine::BEGIN@5 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Hailo::Role::Engine; | ||||
| 2 | # spent 31µs within Hailo::Role::Engine::BEGIN@2 which was called:
# once (31µs+0s) by Mouse::Util::_try_load_one_class at line 4 | ||||
| 3 | 1 | 9µs | $Hailo::Role::Engine::AUTHORITY = 'cpan:AVAR'; | ||
| 4 | 1 | 38µs | 1 | 31µs | } # spent 31µs making 1 call to Hailo::Role::Engine::BEGIN@2 |
| 5 | # spent 7µs within Hailo::Role::Engine::BEGIN@5 which was called:
# once (7µs+0s) by Mouse::Util::_try_load_one_class at line 7 | ||||
| 6 | 1 | 7µs | $Hailo::Role::Engine::VERSION = '0.57'; | ||
| 7 | 1 | 28µs | 1 | 7µs | } # spent 7µs making 1 call to Hailo::Role::Engine::BEGIN@5 |
| 8 | |||||
| 9 | 4 | 116µs | 3 | 355µs | use 5.010; # spent 171µs making 1 call to Hailo::Role::Engine::BEGIN@9
# spent 100µs making 1 call to Hailo::Role::Engine::BEGIN@9.12
# spent 84µs making 1 call to feature::import |
| 10 | 2 | 33µs | 2 | 903µs | # spent 458µs (13+445) within Hailo::Role::Engine::BEGIN@10 which was called:
# once (13µs+445µs) by Mouse::Util::_try_load_one_class at line 10 # spent 458µs making 1 call to Hailo::Role::Engine::BEGIN@10
# spent 445µs making 1 call to Any::Moose::import |
| 11 | 2 | 73µs | 2 | 2.82ms | # spent 1.42ms (13µs+1.41) within Hailo::Role::Engine::BEGIN@11 which was called:
# once (13µs+1.41ms) by Mouse::Util::_try_load_one_class at line 11 # spent 1.42ms making 1 call to Hailo::Role::Engine::BEGIN@11
# spent 1.41ms making 1 call to namespace::clean::import |
| 12 | |||||
| 13 | 1 | 4µs | 1 | 40µs | has storage => ( # spent 40µs making 1 call to Mouse::Role::has |
| 14 | required => 1, | ||||
| 15 | is => 'ro', | ||||
| 16 | documentation => "Our copy of the current Storage object", | ||||
| 17 | ); | ||||
| 18 | |||||
| 19 | 1 | 4µs | 1 | 32µs | has order => ( # spent 32µs making 1 call to Mouse::Role::has |
| 20 | required => 1, | ||||
| 21 | isa => 'Int', | ||||
| 22 | is => 'rw', | ||||
| 23 | documentation => "Our copy of the current markov order", | ||||
| 24 | ); | ||||
| 25 | |||||
| 26 | 1 | 4µs | 1 | 62µs | requires 'learn'; # spent 62µs making 1 call to Mouse::Role::requires |
| 27 | 1 | 3µs | 1 | 50µs | requires 'reply'; # spent 50µs making 1 call to Mouse::Role::requires |
| 28 | |||||
| 29 | 1 | 7µs | 1; | ||
| 30 | |||||
| 31 | =encoding utf8 | ||||
| 32 | |||||
| 33 | =head1 NAME | ||||
| 34 | |||||
| 35 | Hailo::Role::Engine - A role representing a L<Hailo|Hailo> engine backend | ||||
| 36 | |||||
| 37 | =head1 ATTRIBUTES | ||||
| 38 | |||||
| 39 | A C<Hailo::Engine::*> gets the following attributes by using this role: | ||||
| 40 | |||||
| 41 | =head2 C<storage> | ||||
| 42 | |||||
| 43 | A L<storage|Hailo::Role::Storage> object the engine should use to get data from. | ||||
| 44 | |||||
| 45 | =head2 C<order> | ||||
| 46 | |||||
| 47 | The current Markov order used by the storage object. | ||||
| 48 | |||||
| 49 | =head1 METHODS | ||||
| 50 | |||||
| 51 | =head2 C<new> | ||||
| 52 | |||||
| 53 | This is the constructor. It accept the attributes specified in | ||||
| 54 | L</ATTRIBUTES>. | ||||
| 55 | |||||
| 56 | =head2 C<learn> | ||||
| 57 | |||||
| 58 | Learn from the given input and add it to storage. | ||||
| 59 | |||||
| 60 | =head2 C<reply> | ||||
| 61 | |||||
| 62 | Reply to the given input using the storad data. | ||||
| 63 | |||||
| 64 | =head1 AUTHOR | ||||
| 65 | |||||
| 66 | E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org> | ||||
| 67 | |||||
| 68 | =head1 LICENSE AND COPYRIGHT | ||||
| 69 | |||||
| 70 | Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason. | ||||
| 71 | |||||
| 72 | This program is free software, you can redistribute it and/or modify | ||||
| 73 | it under the same terms as Perl itself. | ||||
| 74 | |||||
| 75 | 1 | 8µs | 1 | 4.35ms | =cut # spent 4.35ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |