blib/lib/CGI/Builder/PathInfoMagic.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond 75.0% 3 / 4 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 93.1% 27 / 29 CC 3 SCAR 4.6
CC
3
Cov
95%
__path_info_magic
2.0
process
2.0
BEGIN
1.0
CRAP 1.6
↑ Summary
1 package CGI::Builder::PathInfoMagic;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use base qw/CGI::Builder/;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use vars qw/$VERSION/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 $VERSION = '0.03';
7  
8 3 ▶sub process {
Subroutine process: called CC=2 SCAR=6.9
Pod documented
9 3 my $s = shift;
10 3 ▶ my $p = __path_info_magic() || 'index' ;
Condition100%2/2
__path_info_magic() || 'index'
l!l
21
MC/DC100%1/1
__path_info_magic() || 'index'
__path_info_magic()
Truth table100%2/2
A
A= __path_info_magic()
Aresult
11
00
11
12 3 $s->SUPER::process( $p );
13 }
14  
15 3 ▶sub __path_info_magic{
Subroutine __path_info_magic: called CC=2 SCAR=7.1
16 3 ▶ my $path = $ENV{PATH_INFO} || '/';
Condition50%1/2
$ENV{'PATH_INFO'} || '/'
l!l
30
MC/DC0%0/1
$ENV{'PATH_INFO'} || '/'
$ENV{'PATH_INFO'}
Truth table50%1/2
A
A= $ENV{'PATH_INFO'}
Aresult
11
00
17 3 my @path_entries = split( '/' , $path );
18 3 return join( '_' , @path_entries[1..$#path_entries] );
19 }
20  
21 2 1;
22  
23 =head1 NAME
24  
25 CGI::Builder::PathInfoMagic - Deprecated. Use CGI::Builder::GetPageName instead.
26  
27 =head1 DESCRIPTION
28  
29 This module is deprecated. please use CGI::Builder::GetPageName istead. Thanks.
30  
31 =head1 SEE ALSO
32  
33 CGI::Builder::GetPageName
34  
35 =head1 AUTHOR
36  
37 Tomohiro Teranishi <tomohiro.teranishi+cpan@gmail.com>
38  
39 =head1 COPYRIGHT
40  
41 This program is distributed under the Artistic License
42  
43 =cut
↑ Summary