| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Goo::Thing::pm::Profiler; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | ############################################################################### | 
| 4 |  |  |  |  |  |  | # Nigel Hamilton | 
| 5 |  |  |  |  |  |  | # | 
| 6 |  |  |  |  |  |  | # Copyright Nigel Hamilton 2004 | 
| 7 |  |  |  |  |  |  | # All Rights Reserved | 
| 8 |  |  |  |  |  |  | # | 
| 9 |  |  |  |  |  |  | # Author:       Nigel Hamilton | 
| 10 |  |  |  |  |  |  | # Filename:     Profiler.pm | 
| 11 |  |  |  |  |  |  | # Description:  Create a synopsis of a program / module / script | 
| 12 |  |  |  |  |  |  | # | 
| 13 |  |  |  |  |  |  | # Date          Change | 
| 14 |  |  |  |  |  |  | # ----------------------------------------------------------------------------- | 
| 15 |  |  |  |  |  |  | # 01/11/2004    Auto generated file | 
| 16 |  |  |  |  |  |  | # 01/11/2004    Needed to work with the Goo | 
| 17 |  |  |  |  |  |  | # 16/02/2005    Need to find out a range of lines for things | 
| 18 |  |  |  |  |  |  | # 12/08/2005    Added method: getOption | 
| 19 |  |  |  |  |  |  | # 12/08/2005    Added method: testingNow | 
| 20 |  |  |  |  |  |  | # 24/08/2005    Added method: showHeader | 
| 21 |  |  |  |  |  |  | # | 
| 22 |  |  |  |  |  |  | ############################################################################### | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 1 |  |  | 1 |  | 3271 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 35 |  | 
| 25 |  |  |  |  |  |  |  | 
| 26 | 1 |  |  | 1 |  | 719 | use Goo::Thing::pm::TypeChecker; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 79 |  | 
| 27 | 1 |  |  | 1 |  | 665 | use Goo::Thing::pm::Perl5Profiler; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 22 |  | 
| 28 | 1 |  |  | 1 |  | 481 | use Goo::Thing::pm::Perl6Profiler; | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | use base qw(Goo::Object); | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | ############################################################################### | 
| 34 |  |  |  |  |  |  | # | 
| 35 |  |  |  |  |  |  | # run - generate a profile of a program | 
| 36 |  |  |  |  |  |  | # | 
| 37 |  |  |  |  |  |  | ############################################################################### | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | sub run { | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | my ($this, $thing) = @_; | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | if (Goo::Thing::pm::TypeChecker::is_perl6($thing)) { | 
| 44 |  |  |  |  |  |  | Goo::Thing::pm::Perl6Profiler->new()->run($thing); | 
| 45 |  |  |  |  |  |  | } else { | 
| 46 |  |  |  |  |  |  | Goo::Thing::pm::Perl5Profiler->new()->run($thing); | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | } | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | } | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | 1; | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | __END__ | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =head1 NAME | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | Goo::Thing::pm::Profiler - Show a profile of a Perl program | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | use Goo::Thing::pm::Profiler; | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =head1 METHODS | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =over | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | =item run | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | Delegate to Goo::Thing::pm::Perl6Profiler or Goo::Thing::pm::Perl5Profiler. | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | =back | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | =head1 AUTHOR | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | Nigel Hamilton <nigel@trexy.com> | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 85 |  |  |  |  |  |  |  |