| 1 | # file: Text/TreeFile.pm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # Copyright (c) 2000 John Kirk. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # This program is free software; you can redistribute it and/or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # modify it under the same terms as Perl itself. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | # The latest version of this module should always be available | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | # at any CPAN (http://www.cpan.org) mirror, or from the author: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | # http://perl.dystanhays.com/jnk | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | package Text::TreeFile; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | ▶ | use vars qw($VERSION @ISA @EXPORT_OK); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 2 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | require AutoLoader; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 2 | $VERSION=0.39; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 2 | @ISA=qw(Exporter AutoLoader); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 2 | @EXPORT_OK=qw(showlines showglobals); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 2 | require 5.002; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | ▶ | use FileHandle; # nice to easily have filehandles as plain variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | my %proto=( 'endq'=>undef,'top'=>undef,'idir'=>undef,'iname'=>undef, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 'nest'=>undef,'level'=>undef,'line'=>undef,'lev'=>undef, ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | sub _loadtree; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | sub _readspec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | sub showlines; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | sub showglobals; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 3 | ▶ | sub new { my ($that,$iname,$endq)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=7 SCAR=20.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 3 | ▶ | my $class=ref($that)||$that; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $that || $that
MC/DC0%0/2
ref $that || $that
ref $that
$that
Truth table33%1/3
A || B
A= ref $thatB= $that
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 3 | my $me={_prop=>\%proto,%proto,}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 3 | bless $me,$class; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 3 | ▶ | if(defined $endq) { $$me{endq}=$endq; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 3 | ▶ | if(defined $iname) { $$me{iname}=$iname; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 3 | $iname=~/^(.*\/)([^\/]*)$/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 3 | ▶ | $$me{idir}=(defined $1 and $1 ne '')?$1:''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $1 and $1 ne ""
MC/DC0%0/2
defined $1 and $1 ne ""
defined $1
$1 ne ""
Truth table33%1/3
A and B
A= defined $1B= $1 ne ""
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 3 | ▶ | $$me{top}=_loadtree $me or return undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 3 | return $me; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 28 | ▶ | sub _loadtree { my $me=shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_loadtree: called CC=18 SCAR=29.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 28 | my ($spec,$cnt); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 28 | ▶ | if(!defined $$me{nest}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 3 | $$me{nest}=0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 3 | $$me{lev}=[{'cum'=>0,'lev'=>0,'ifn'=>undef,'ifh'=>undef,'ifl'=>undef,}]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 3 | ▶ | if(defined $$me{endq}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 1 | $spec=[]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 1 | $cnt=0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 28 | my $lp=$$me{lev}[$$me{nest}]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 28 | ▶ | if((!defined $$lp{ifh})&&($$me{nest}==0)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not defined $lp->{"ifh"} and $me->{"nest"} == 0
MC/DC100%2/2
not defined $lp->{"ifh"} and $me->{"nest"} == 0
not defined $lp->{"ifh"}
$me->{"nest"} == 0
Truth table100%3/3
not(A) and B
A= not defined $lp->{"ifh"}B= $me->{"nest"} == 0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 3 | ▶ | if(exists $$me{iname} and defined $$me{iname}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
exists $me->{"iname"} and defined $me->{"iname"}
MC/DC0%0/2
exists $me->{"iname"} and defined $me->{"iname"}
exists $me->{"iname"}
defined $me->{"iname"}
Truth table33%1/3
A and B
A= exists $me->{"iname"}B= defined $me->{"iname"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 3 | $$lp{ifn}=$$me{iname}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | print "_loadtree(): wasn't given a filename at the top file nesting level\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 28 | ▶ | if(!defined $$lp{ifn}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | print "_loadtree() got no input filename at file nesting level $$me{nest}\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | } elsif(!defined $$lp{ifh}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 4 | $$lp{ifh}=new FileHandle "<$$lp{ifn}"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 4 | $$me{line}=undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 28 | ▶ | if(!defined $$lp{ifh}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | print "_loadtree() couldn't open ifile: $$lp{ifn}\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 28 | ▶ | if(!defined $$me{line}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 4 | ($$me{level},$$me{line})=_readspec $$lp{ifh},$$lp{ifl}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 28 | ▶ | while(defined $$me{line}) { # loop on top-level specs; test eof from readspec | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 29 | ▶ | if($$me{line}=~/^include\s+(\S+)/) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 1 | my $iname="$$me{idir}$1"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 1 | my ($cum,$lev)=($$me{lev}[$$me{nest}]{cum},$$me{lev}[$$me{nest}]{lev}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 1 | ++$$me{nest}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 1 | $$me{lev}[$$me{nest}]={ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 'cum'=>$cum+$lev,'lev'=>0,'ifn'=>$iname,'ifh'=>undef,'ifl'=>undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | ▶ | if(defined $cnt) { $$spec[$cnt++]=_loadtree($me); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 1 | else { $spec =_loadtree($me); } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 1 | --$$me{nest}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 1 | ($$me{level},$$me{line})=_readspec $$lp{ifh},$$lp{ifl}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 28 | my @specs=(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 28 | ▶ | if(defined $cnt) { $$spec[$cnt++]=[$$me{line},\@specs]; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 26 | else { $spec =[$$me{line},\@specs]; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 28 | ($$me{level},$$me{line})=_readspec $$lp{ifh},$$lp{ifl}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 28 | my $sublevel=(++$$lp{lev}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 28 | ▶ | while((defined $$me{level}) && ($$me{level}==$sublevel)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $me->{"level"} and $me->{"level"} == $sublevel
MC/DC50%1/2
defined $me->{"level"} and $me->{"level"} == $sublevel
defined $me->{"level"}
$me->{"level"} == $sublevel
Truth table66%2/3
A and B
A= defined $me->{"level"}B= $me->{"level"} == $sublevel
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 24 | push @specs,_loadtree($me); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 28 | --$$lp{lev}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 29 | ▶ | last if(!defined $cnt); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 28 | return $spec; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 33 | ▶ | sub _readspec { my $ifh=shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_readspec: called CC=18 SCAR=30.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 33 | ▶ | if(!defined $_[0]) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 4 | ▶ | while(<$ifh>) { # this is the first line of a file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 10 | ▶ | next if(/^exec\s/ or /^[#;\/]/ or /^\s*\.\.\./ or /^\s*$/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition77%7/9
/^exec\s/ or m[^[#;/]] or /^\s*\.\.\./ or /^\s*$/
/^exec\s/ or m[^[#;/]] or /^\s*\.\.\./
/^exec\s/ or m[^[#;/]]
MC/DC50%2/4
/^exec\s/ or m[^[#;/]] or /^\s*\.\.\./ or /^\s*$/
/^exec\s/
m[^[#;/]]
/^\s*\.\.\./
/^\s*$/
Truth table60%3/5
A or B or C or D
A= /^exec\s/B= m[^[#;/]]C= /^\s*\.\.\./D= /^\s*$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 4 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 4 | ▶ | if(eof($ifh)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | $_[0]=''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | return (0,undef); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 4 | chop; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 4 | $_[0]=$_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 33 | ▶ | if(!defined $_[0]) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | return (undef,undef); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 33 | ▶ | if($_[0] eq '') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 3 | return (0,undef); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 30 | my ($indent,$line,$str); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 30 | ($indent,$line)=$_[0]=~/^([ ]*)(.*)$/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 30 | my $level=length($indent)/2; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 30 | ▶ | die "indent. not a mult. of two spaces\n" if($level*2!=length($indent)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 30 | ▶ | while(<$ifh>) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 31 | ▶ | next if(/^[#;]/ or /^\s*\.\.\.\s*$/ or /^\s*$/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
/^[#;]/ or /^\s*\.\.\.\s*$/ or /^\s*$/
/^[#;]/ or /^\s*\.\.\.\s*$/
MC/DC66%2/3
/^[#;]/ or /^\s*\.\.\.\s*$/ or /^\s*$/
/^[#;]/
/^\s*\.\.\.\s*$/
/^\s*$/
Truth table75%3/4
A or B or C
A= /^[#;]/B= /^\s*\.\.\.\s*$/C= /^\s*$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 27 | chop; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 27 | ($indent,$str)=/^(\s*)\.\.\.(.*)$/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 27 | ▶ | if(defined $str) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $str=~s/^\s+/\ /; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | $line.=$str; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 27 | $_[0]=$_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 27 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 30 | ▶ | if(eof($ifh)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 6 | ▶ | $_[0]='' if(!defined $_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 30 | return ($level,$line); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||