PPI/Statement/Include/Perl6.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« PPI/Statement/Expression.pm ↑ Summary PPI/Statement/Null.pm »
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 62 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
42 62 ▶use PPI::Statement::Include ();
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 62 ▶use vars qw{$VERSION @ISA};
Subroutine BEGIN: called CC=1 SCAR=0.0
45 BEGIN {
46 62 ▶ $VERSION = '1.236';
Subroutine BEGIN: called CC=1 SCAR=0.0
47 62 @ISA = 'PPI::Statement::Include';
48 }
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 2 ▶ $_[0]->{perl6};
Subroutine perl6: called CC=1 SCAR=0.0
Pod documented
61 }
62  
63 62 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
« PPI/Statement/Expression.pm ↑ Summary PPI/Statement/Null.pm »