| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Statement/Include/Perl6.pm |
| Statements | Executed 9 statements in 127µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 12µs | 23µs | PPI::Statement::Include::Perl6::BEGIN@41 |
| 1 | 1 | 1 | 9µs | 9µs | PPI::Statement::Include::Perl6::BEGIN@45 |
| 1 | 1 | 1 | 6µs | 39µs | PPI::Statement::Include::Perl6::BEGIN@44 |
| 1 | 1 | 1 | 4µs | 4µs | PPI::Statement::Include::Perl6::BEGIN@42 |
| 0 | 0 | 0 | 0s | 0s | PPI::Statement::Include::Perl6::perl6 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package PPI::Statement::Include::Perl6; | ||||
| 2 | |||||
| 3 | =pod | ||||
| 4 | |||||
| 5 | =head1 NAME | ||||
| 6 | |||||
| 7 | PPI::Statement::Include::Perl6 - Inline Perl 6 file section | ||||
| 8 | |||||
| 9 | =head1 SYNOPSIS | ||||
| 10 | |||||
| 11 | use v6-alpha; | ||||
| 12 | |||||
| 13 | grammar My::Grammar { | ||||
| 14 | ... | ||||
| 15 | } | ||||
| 16 | |||||
| 17 | =head1 INHERITANCE | ||||
| 18 | |||||
| 19 | PPI::Statement::Include::Perl6 | ||||
| 20 | isa PPI::Statement::Include | ||||
| 21 | isa PPI::Statement | ||||
| 22 | isa PPI::Node | ||||
| 23 | isa PPI::Element | ||||
| 24 | |||||
| 25 | =head1 DESCRIPTION | ||||
| 26 | |||||
| 27 | A C<PPI::Statement::Include::Perl6> is a special include statement that | ||||
| 28 | indicates the start of a section of Perl 6 code inlined into a regular | ||||
| 29 | Perl 5 code file. | ||||
| 30 | |||||
| 31 | The primary purpose of the class is to allow L<PPI> to provide at least | ||||
| 32 | basic support for "6 in 5" modules like v6.pm; | ||||
| 33 | |||||
| 34 | Currently, PPI only supports starting a Perl 6 block. It does not | ||||
| 35 | currently support changing back to Perl 5 again. Additionally all POD | ||||
| 36 | and __DATA__ blocks and __END__ blocks will be included in the Perl 6 | ||||
| 37 | string and will not be parsed by PPI. | ||||
| 38 | |||||
| 39 | =cut | ||||
| 40 | |||||
| 41 | 2 | 22µs | 2 | 35µs | # spent 23µs (12+12) within PPI::Statement::Include::Perl6::BEGIN@41 which was called:
# once (12µs+12µs) by PPI::Statement::Include::BEGIN@49 at line 41 # spent 23µs making 1 call to PPI::Statement::Include::Perl6::BEGIN@41
# spent 12µs making 1 call to strict::import |
| 42 | 2 | 21µs | 1 | 4µs | # spent 4µs within PPI::Statement::Include::Perl6::BEGIN@42 which was called:
# once (4µs+0s) by PPI::Statement::Include::BEGIN@49 at line 42 # spent 4µs making 1 call to PPI::Statement::Include::Perl6::BEGIN@42 |
| 43 | |||||
| 44 | 2 | 30µs | 2 | 71µs | # spent 39µs (6+32) within PPI::Statement::Include::Perl6::BEGIN@44 which was called:
# once (6µs+32µs) by PPI::Statement::Include::BEGIN@49 at line 44 # spent 39µs making 1 call to PPI::Statement::Include::Perl6::BEGIN@44
# spent 32µs making 1 call to vars::import |
| 45 | # spent 9µs within PPI::Statement::Include::Perl6::BEGIN@45 which was called:
# once (9µs+0s) by PPI::Statement::Include::BEGIN@49 at line 48 | ||||
| 46 | 1 | 400ns | $VERSION = '1.215'; | ||
| 47 | 1 | 9µs | @ISA = 'PPI::Statement::Include'; | ||
| 48 | 1 | 42µs | 1 | 9µs | } # spent 9µs making 1 call to PPI::Statement::Include::Perl6::BEGIN@45 |
| 49 | |||||
| 50 | =pod | ||||
| 51 | |||||
| 52 | =head2 perl6 | ||||
| 53 | |||||
| 54 | The C<perl6> method returns the block of Perl 6 code that is attached to | ||||
| 55 | the "use v6...;" command. | ||||
| 56 | |||||
| 57 | =cut | ||||
| 58 | |||||
| 59 | sub perl6 { | ||||
| 60 | $_[0]->{perl6}; | ||||
| 61 | } | ||||
| 62 | |||||
| 63 | 1 | 2µs | 1; | ||
| 64 | |||||
| 65 | =pod | ||||
| 66 | |||||
| 67 | =head1 TO DO | ||||
| 68 | |||||
| 69 | - Write specific unit tests for this package | ||||
| 70 | |||||
| 71 | =head1 SUPPORT | ||||
| 72 | |||||
| 73 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
| 74 | |||||
| 75 | =head1 AUTHOR | ||||
| 76 | |||||
| 77 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
| 78 | |||||
| 79 | =head1 COPYRIGHT | ||||
| 80 | |||||
| 81 | Copyright 2001 - 2011 Adam Kennedy. | ||||
| 82 | |||||
| 83 | This program is free software; you can redistribute | ||||
| 84 | it and/or modify it under the same terms as Perl itself. | ||||
| 85 | |||||
| 86 | The full text of the license can be found in the | ||||
| 87 | LICENSE file included with this module. | ||||
| 88 | |||||
| 89 | =cut |