File Coverage

blib/lib/PPI/Statement/Include/Perl6.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 11 11 100.0


line stmt bran cond sub pod time 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 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 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 64     64   372 use strict;
  64         127  
  64         1447  
42 64     64   281 use PPI::Statement::Include ();
  64         143  
  64         4587  
43              
44             our $VERSION = '1.276';
45              
46             our @ISA = "PPI::Statement::Include";
47              
48             =pod
49              
50             =head2 perl6
51              
52             The C method returns the block of Perl 6 code that is attached to
53             the "use v6...;" command.
54              
55             =cut
56              
57             sub perl6 {
58 2     2 1 791 $_[0]->{perl6};
59             }
60              
61             1;
62              
63             =pod
64              
65             =head1 TO DO
66              
67             - Write specific unit tests for this package
68              
69             =head1 SUPPORT
70              
71             See the L in the main module.
72              
73             =head1 AUTHOR
74              
75             Adam Kennedy Eadamk@cpan.orgE
76              
77             =head1 COPYRIGHT
78              
79             Copyright 2001 - 2011 Adam Kennedy.
80              
81             This program is free software; you can redistribute
82             it and/or modify it under the same terms as Perl itself.
83              
84             The full text of the license can be found in the
85             LICENSE file included with this module.
86              
87             =cut