Branch Coverage

File:blib/lib/Class/Shared.pm
Coverage:89.8%

line%coveragebranch
292100TFunless defined $class and length $class
298100TFunless my($valid) = $class =~ /$CLASS_CHARS_RE/
303100TFunless $part =~ /$CLASS_PART_RE/
372100TFunless defined $path and length $path
374100TFunless open my $fh, "<", $path
383100TFunless defined $got
384100TFunless $got
38750TFunless close $fh
389100TFif length $secret > $MAX_SECRET
394100TFunless length $secret
413100TFunless defined $value and length $value
416100TFunless my($hex) = $value =~ /$FINGERPRINT_RE/
441100TFif (defined $opt{'fingerprint'}) { }
458100TFlength $dir ? :
48150TFunless open STDIN, "<", $null
483100TFif (open my $log_fh, '>>', $log) { }
48450TFunless open STDOUT, ">&", $log_fh
48550TFunless open STDERR, ">&", $log_fh
48650TFunless close $log_fh
48850TFunless open STDOUT, ">", $null
48950TFunless open STDERR, ">&", \*STDOUT
502100TFif (defined $opt{'dir'} and length $opt{'dir'}) { }
100TFelsif (defined $ENV{'CLASS_SHARED_DIR'} and length $ENV{'CLASS_SHARED_DIR'}) { }
100TFelsif (defined $ENV{'XDG_RUNTIME_DIR'} and length $ENV{'XDG_RUNTIME_DIR'} and -d $ENV{'XDG_RUNTIME_DIR'}) { }
50TFelsif (-d "/run/user/$>") { }
521100TFunless my($clean) = $dir =~ /\A([^\0]+)\z/
535100TFif defined $UNIX_SOCKETS
537100TFeval {         do {         require Socket; Socket::pack_sockaddr_un('probe'); socketpair(my $reader, my $writer, &Socket::AF_UNIX(), &Socket::SOCK_STREAM(), 0) ? 1 : 0 } } ? :
54750TFsocketpair(my $reader, my $writer, &Socket::AF_UNIX(), &Socket::SOCK_STREAM(), 0) ? :
563100TFunless defined $has_unix_sockets
565100TFif $has_unix_sockets
577100TFunless defined $dir and length $dir
581100TFunless (-d $dir)
584100TFunless (mkdir $dir, 448)
586100TFunless -d $dir
602100TFunless @stat
604100TFif $stat[4] != $>
607100TFif $stat[2] & 18
627100TFunless $safe
630100TFunless @stat
632100TFunless -S _
634100TFif $stat[4] != $>
660100TFunless defined $path and length $path
662100TFif (length $path > $MAX_SOCKET_PATH)