| 1 | package Bro::Log::Parse; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Perl interface for parsing Bro logfiles | ||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||
| 4 | 8 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 8 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 8 | ▶ | use 5.10.1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | # use Exporter; | ||||||||||||||||||||||||||||||||||||||||||
| 9 | 8 | ▶ | use autodie; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 8 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 8 | ▶ | use Scalar::Util qw/openhandle/; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | 8 | our $VERSION = '0.08'; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | #@EXPORT_OK = qw//; | ||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | 8 | my $json = eval { | |||||||||||||||||||||||||||||||||||||||||
| 18 | 8 | require JSON; | |||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | JSON->import(); | |||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 21 | }; # true if we support reading from json | ||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 8 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 8 | my @accessors = qw/fh file line headers headerlines fields/; | |||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 8 | for my $accessor ( @accessors ) { | |||||||||||||||||||||||||||||||||||||||||
| 27 | 8 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 8 | ▶ | *$accessor = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 8 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 30 | 8 | return $self->{$accessor}; | |||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||
| 32 | 48 | } | |||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | 11 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=14 SCAR=26.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | 11 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 38 | 11 | my $arg = shift; | |||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | 11 | my $self = {}; | |||||||||||||||||||||||||||||||||||||||||
| 41 | 11 | $self->{line} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 11 | ▶ | if ( !defined($arg) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | 1 | $self->{diamond} = 1; | |||||||||||||||||||||||||||||||||||||||||
| 45 | } elsif ( ref($arg) eq 'HASH' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 5 | $self = $arg; | |||||||||||||||||||||||||||||||||||||||||
| 47 | } elsif ( defined(openhandle($arg)) ) { | ||||||||||||||||||||||||||||||||||||||||||
| 48 | 1 | $self->{fh} = $arg; | |||||||||||||||||||||||||||||||||||||||||
| 49 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 50 | 4 | $self->{file} = $arg; | |||||||||||||||||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||
| 53 | 11 | bless $self, $class; | |||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | 11 | ▶ | if ( defined($self->{file}) && !(defined($self->{fh})) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $self->{"file"} and not defined $self->{"fh"}
MC/DC50%1/2
defined $self->{"file"} and not defined $self->{"fh"}
defined $self->{"file"}
not defined $self->{"fh"}
Truth table66%2/3
A and not(B)
A= defined $self->{"file"}B= not defined $self->{"fh"}
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | 6 | ▶ | unless ( -f $self->{file} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | croak("Could not open ".$self->{file}); | |||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | open( my $fh, "<", $self->{file} ) | ||||||||||||||||||||||||||||||||||||||||||
| 61 | 6 | ▶ | or croak("Cannot open ".$self->{file}); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | 6 | $self->{fh} = $fh; | |||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 11 | ▶ | if ( !defined($self->{fh}) && ( !defined($self->{diamond}) || !$self->{diamond} ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
defined $self->{"fh"} or defined $self->{"diamond"} and $self->{"diamond"}
defined $self->{"diamond"} and $self->{"diamond"}
MC/DC66%2/3
defined $self->{"fh"} or defined $self->{"diamond"} and $self->{"diamond"}
defined $self->{"fh"}
defined $self->{"diamond"}
$self->{"diamond"}
Truth table75%3/4
A or B and C
A= defined $self->{"fh"}B= defined $self->{"diamond"}C= $self->{"diamond"}
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | 1 | croak("No filename given in constructor. Aborting"); | |||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 10 | $self->{json_file} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 70 | 10 | $self->{names} = [ $self->readheader() ]; | |||||||||||||||||||||||||||||||||||||||||
| 71 | 10 | $self->{fields} = $self->{names}; | |||||||||||||||||||||||||||||||||||||||||
| 72 | 10 | ▶ | $self->{empty_as_undef} //= 0; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{"empty_as_undef"} //= 0
MC/DC100%1/1
$self->{"empty_as_undef"} //= 0
$self->{"empty_as_undef"}
Truth table100%2/2
A
A= $self->{"empty_as_undef"}
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||
| 74 | 10 | ▶ | $self->{headers} //= {}; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->{"headers"} //= {}
MC/DC0%0/1
$self->{"headers"} //= {}
$self->{"headers"}
Truth table50%1/2
A
A= $self->{"headers"}
| |||||||||||||||||||||||||||||||||||||||||||
| 75 | 10 | ▶ | $self->{headerlines} //= []; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->{"headerlines"} //= []
MC/DC0%0/1
$self->{"headerlines"} //= []
$self->{"headerlines"}
Truth table50%1/2
A
A= $self->{"headerlines"}
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||
| 77 | 10 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | 10 | ▶ | sub readheader { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
readheader: called CC=11 SCAR=29.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 81 | 10 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | 10 | my @headerlines; | |||||||||||||||||||||||||||||||||||||||||
| 84 | my @names; | ||||||||||||||||||||||||||||||||||||||||||
| 85 | 10 | my $firstline = 1; | |||||||||||||||||||||||||||||||||||||||||
| 86 | # first: read header line. This is a little brittle, but... welll... well, it is. | ||||||||||||||||||||||||||||||||||||||||||
| 87 | 10 | ▶ | while ( my $line = $self->extractNextLine() ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 80 | ▶ | if ( $firstline ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 89 | 10 | $firstline = 0; | |||||||||||||||||||||||||||||||||||||||||
| 90 | 10 | ▶ | if ( length($line) > 1 && substr($line, 0, 1) eq "{" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
length $line > 1 and substr($line, 0, 1) eq "{"
MC/DC0%0/2
length $line > 1 and substr($line, 0, 1) eq "{"
length $line > 1
substr($line, 0, 1) eq "{"
Truth table33%1/3
A and B
A= length $line > 1B= substr($line, 0, 1) eq "{"
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | # Json file. stuff line in saved_line and try to extract header fields... | ||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | ▶ | croak("Parsing json formatted log files needs JSON module") unless ( $json ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | my $val = decode_json($line); | |||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | $self->{saved_line} = $line; | |||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | if ( !defined($val) || ref($val) ne "HASH" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not defined $val or ref $val ne "HASH"
MC/DC0%0/2
not defined $val or ref $val ne "HASH"
not defined $val
ref $val ne "HASH"
Truth table0%0/3
not(A) or B
A= not defined $valB= ref $val ne "HASH"
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | croak("Error parsing first line of json formatted log - $line"); | |||||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | $self->{json_file} = 1; | |||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | return sort keys %$val; | |||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||
| 102 | 80 | chomp($line); | |||||||||||||||||||||||||||||||||||||||||
| 103 | 80 | push(@headerlines, $line); | |||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||
| 105 | 80 | my @fields = split /\t/,$line; | |||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||
| 107 | 80 | ▶ | unless ( $line =~ /^#/ ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | croak("Did not find required fields and types header lines: $line"); | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | 80 | my $type = shift(@fields); | |||||||||||||||||||||||||||||||||||||||||
| 112 | 80 | ▶ | if ( "#fields" eq $type ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 113 | # yay. | ||||||||||||||||||||||||||||||||||||||||||
| 114 | # we have our field names... | ||||||||||||||||||||||||||||||||||||||||||
| 115 | 10 | @names = @fields; | |||||||||||||||||||||||||||||||||||||||||
| 116 | } elsif ( "#types" eq $type) { | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 10 | last; | |||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | 10 | $self->{headerlines} = \@headerlines; | |||||||||||||||||||||||||||||||||||||||||
| 122 | 10 | $self->{headers} = { map {/#(\w+)\s+(.*)/;$1=>$2} @headerlines }; | |||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | 10 | return @names; | |||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | 22 | ▶ | sub getLine { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getLine: called CC=13 SCAR=27.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | 22 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | 22 | my @names = @{$self->{names}}; | |||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | 22 | ▶ | while ( my $line = $self->extractNextLine ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 134 | 31 | my $removed = chomp($line); | |||||||||||||||||||||||||||||||||||||||||
| 135 | 31 | $self->{line} = $line; | |||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||
| 137 | 31 | ▶ | if ( $self->{json_file} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | my $val = decode_json($line); | |||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | ▶ | if ( !defined($val) || ref($val) ne "HASH" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not defined $val or ref $val ne "HASH"
MC/DC0%0/2
not defined $val or ref $val ne "HASH"
not defined $val
ref $val ne "HASH"
Truth table0%0/3
not(A) or B
A= not defined $valB= ref $val ne "HASH"
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | croak("Error parsing line of json formatted log - $line"); | |||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | $self->{names} = [ sort keys %$val ]; | |||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | return $val; | |||||||||||||||||||||||||||||||||||||||||
| 144 | } | ||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | 31 | my @fields = split "\t", $line; | |||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||
| 148 | 31 | ▶ | if ( $line =~ /^#/ ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | 12 | ▶ | if ( "#fields" eq shift(@fields) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | 1 | @names = @fields; | |||||||||||||||||||||||||||||||||||||||||
| 151 | 1 | $self->{names} = \@fields; | |||||||||||||||||||||||||||||||||||||||||
| 152 | # This is not really nice, but for the moment we do not really need any | ||||||||||||||||||||||||||||||||||||||||||
| 153 | # of the other header lines for parsing files - and we do not keep track | ||||||||||||||||||||||||||||||||||||||||||
| 154 | # of them. Sorry... | ||||||||||||||||||||||||||||||||||||||||||
| 155 | 1 | $self->{headers} = [ join("\t", ("#fields", @fields)) ]; | |||||||||||||||||||||||||||||||||||||||||
| 156 | } | ||||||||||||||||||||||||||||||||||||||||||
| 157 | 12 | next; | |||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||
| 159 | 19 | my %f; | |||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||
| 161 | 19 | ▶ | unless (scalar @names == scalar @fields) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | 1 | ▶ | next if ( $removed == 0 ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | croak("Number of expected fields does not match number of fields in file"); | |||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||
| 166 | 18 | for my $name ( @names ) { | |||||||||||||||||||||||||||||||||||||||||
| 167 | 360 | my $field = shift(@fields); | |||||||||||||||||||||||||||||||||||||||||
| 168 | 360 | ▶ | if ( ( $field eq "-" ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 169 | 90 | $f{$name} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 170 | } elsif ( $field eq "(empty)" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 14 | ▶ | $f{$name} = $self->{empty_as_undef} ? undef : []; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 172 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 173 | 256 | $f{$name} = $field; | |||||||||||||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||||||||||||
| 175 | } | ||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||
| 177 | 18 | return \%f; | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | 115 | ▶ | sub extractNextLine { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
extractNextLine: called CC=3 SCAR=12.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 182 | 115 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | 115 | ▶ | if( defined($self->{saved_line}) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | my $sl = $self->{saved_line}; | |||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | undef $self->{saved_line}; | |||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | return $sl; | |||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | 115 | my $in = $self->{fh}; | |||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||
| 192 | 115 | ▶ | return defined($in) ? <$in> : <>; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 193 | } | ||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | 8 | 1; | |||||||||||||||||||||||||||||||||||||||||