PPI/Token/Cast.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« PPI/Structure/When.pm ↑ Summary PPI/Token/Label.pm »
1 package PPI::Token::Cast;
2  
3 =pod
4  
5 =head1 NAME
6  
7 PPI::Token::Cast - A prefix which forces a value into a different context
8  
9 =head1 INHERITANCE
10  
11 PPI::Token::Cast
12 isa PPI::Token
13 isa PPI::Element
14  
15 =head1 DESCRIPTION
16  
17 A "cast" in PPI terms is one of more characters used as a prefix which force
18 a value into a different class or context.
19  
20 This includes referencing, dereferencing, and a few other minor cases.
21  
22 For expressions such as C<@$foo> or C<@{ $foo{bar} }> the C<@> in both cases
23 represents a cast. In this case, an array dereference.
24  
25 =head1 METHODS
26  
27 There are no additional methods beyond those provided by the parent
28 L<PPI::Token> and L<PPI::Element> classes.
29  
30 =cut
31  
32 62 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 62 ▶use PPI::Token ();
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 62 ▶use vars qw{$VERSION @ISA};
Subroutine BEGIN: called CC=1 SCAR=0.0
36 BEGIN {
37 62 ▶ $VERSION = '1.236';
Subroutine BEGIN: called CC=1 SCAR=0.0
38 62 @ISA = 'PPI::Token';
39 }
40  
41  
42  
43  
44 #####################################################################
45 # Tokenizer Methods
46  
47 # A cast is either % @ $ or $#
48 sub __TOKENIZER__on_char {
49 871 ▶ $_[1]->_finalize_token->__TOKENIZER__on_char( $_[1] );
Subroutine __TOKENIZER__on_char: called CC=1 SCAR=0.0
50 }
51  
52 62 1;
53  
54 =pod
55  
56 =head1 SUPPORT
57  
58 See the L<support section|PPI/SUPPORT> in the main module.
59  
60 =head1 AUTHOR
61  
62 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
63  
64 =head1 COPYRIGHT
65  
66 Copyright 2001 - 2011 Adam Kennedy.
67  
68 This program is free software; you can redistribute
69 it and/or modify it under the same terms as Perl itself.
70  
71 The full text of the license can be found in the
72 LICENSE file included with this module.
73  
74 =cut
« PPI/Structure/When.pm ↑ Summary PPI/Token/Label.pm »