| line |
true |
false |
branch |
|
855
|
0 |
7 |
if ref $class |
|
898
|
0 |
7 |
if $ENV{'SPACETRACK_OPT'} |
|
904
|
0 |
7 |
if (defined(my $id = delete $arg{'identity'})) { } |
|
|
0 |
7 |
elsif ($ENV{'SPACETRACK_USER'}) { } |
|
908
|
0 |
0 |
unless "" ne $user and "" ne $pass |
|
918
|
0 |
7 |
if defined $ENV{'SPACETRACK_VERIFY_HOSTNAME'} |
|
920
|
2 |
5 |
if keys %arg |
|
1005
|
0 |
0 |
unless ($self->{'with_name'}) |
|
1008
|
0 |
0 |
if @content % 3 |
|
1019
|
0 |
0 |
if "" eq $resp->content |
|
1041
|
0 |
1 |
wantarray ? : |
|
|
1 |
0 |
unless ref $self |
|
1046
|
0 |
0 |
$mutator{$_} == \&Astro::SpaceTrack::_mutate_spacetrack_interface ? : |
|
1049
|
0 |
0 |
wantarray ? : |
|
1069
|
1 |
0 |
if ($] >= 5.01) { } |
|
1175
|
1 |
1 |
unless $resp->is_success |
|
1184
|
0 |
1 |
unless "json" eq $format |
|
1189
|
1 |
0 |
unless ($opt->{'json'}) |
|
1200
|
0 |
100 |
if defined $datum->{'SPADOC_CD'} and $datum->{'SPADOC_CD'} eq "ALL" |
|
1202
|
0 |
1000 |
defined $datum->{$_} ? : |
|
1210
|
1 |
0 |
unless wantarray |
|
1232
|
0 |
2 |
if $name eq "spacetrack" |
|
1329
|
0 |
3 |
unless defined $name |
|
1339
|
0 |
3 |
if ref($query = $self->_celestrak_validate_query(delete $opt->{'query'}, $name, {"CATNR" => 1,"GROUP" => 1,"INTDES" => 1,"NAME" => 1,"SPECIAL" => 1}, "GROUP")) |
|
1345
|
0 |
3 |
if ref($format = $self->_celestrak_validate_format(delete $opt->{'format'})) |
|
1360
|
1 |
2 |
if $check = $self->_celestrak_response_check($resp, "celestrak", $name) |
|
1363
|
1 |
1 |
if $name eq "iridium" |
|
1535
|
0 |
1 |
if $opt->{'rms'} and $opt->{'match'} |
|
1540
|
1 |
1 |
if ($opt->{'rms'} or $opt->{'match'}) |
|
1542
|
0 |
2 |
if defined $opt->{$key} |
|
1556
|
0 |
1 |
unless not $opt->{$key} or $info->{$key} |
|
1566
|
1 |
1 |
if ($opt->{'rms'}) { } |
|
|
0 |
1 |
elsif ($opt->{'match'}) { } |
|
1576
|
1 |
0 |
unless defined $source |
|
1581
|
0 |
1 |
if ref($query = $self->_celestrak_validate_query(delete $opt->{'query'}, $name, {"CATNR" => 1,"FILE" => 1,"INTDES" => 1,"NAME" => 1,"SOURCE" => 1,"SPECIAL" => 1}, "FILE")) |
|
1587
|
0 |
1 |
if ref($format = $self->_celestrak_validate_format(delete $opt->{'format'})) |
|
1603
|
0 |
2 |
if $check = $self->_celestrak_response_check($resp, "celestrak_supplemental", $name) |
|
1618
|
0 |
4 |
defined $format ? : |
|
1619
|
0 |
4 |
unless $valid_format{$format} |
|
1623
|
0 |
4 |
if $format eq "JSON" and $self->getv("pretty") |
|
1632
|
4 |
0 |
defined $dflt ? : |
|
|
0 |
4 |
$name =~ / \A [0-9]{4}-[0-9]+ \z /msx ? : |
|
|
0 |
4 |
$name =~ / \A [0-9]+ \z /msx ? : |
|
|
0 |
4 |
defined $query ? : |
|
1636
|
0 |
4 |
unless defined $query |
|
1638
|
0 |
4 |
unless $valid->{$query} |
|
1665
|
0 |
5 |
unless ($resp->is_success) |
|
1666
|
0 |
0 |
if $resp->code == 404 |
|
1674
|
1 |
4 |
if ($content =~ / \A Invalid \s+ query: /msx) |
|
1675
|
1 |
0 |
if $content =~ / \b (?: GROUP | FILE ) =\Q$name\E \s not \s found \b /msx |
|
1684
|
0 |
4 |
if (my $loc = $resp->header("Content-Location")) |
|
1685
|
0 |
0 |
if ($loc =~ / redirect [.] htm [?] ( \d{3} ) ; /msx) |
|
1687
|
0 |
0 |
if @args |
|
1688
|
0 |
0 |
if $1 == 404 |
|
1695
|
0 |
4 |
unless (my $type = lc $resp->header("Content-Type")) |
|
1697
|
0 |
0 |
if @args |
|
1703
|
0 |
4 |
unless $valid_type{$type} |
|
1709
|
0 |
4 |
if /^No GP data found\b/ms |
|
1712
|
0 |
4 |
if /^(?:GROUP|FILE) "[^"]+" does not exist/ms |
|
1717
|
0 |
0 |
if @args |
|
1848
|
78 |
5 |
unless defined $resp |
|
1852
|
2 |
1 |
if / $re \s+ = \s+ (.+) /imsx |
|
1912
|
0 |
1 |
unless $resp->is_success |
|
1921
|
0 |
1 |
unless "json" eq $format |
|
1931
|
0 |
100 |
if defined $datum->{'SPADOC_CD'} |
|
1934
|
0 |
1 |
if ($opt->{'json'}) { } |
|
1996
|
0 |
1 |
unless @args and defined $args[0] |
|
1998
|
0 |
1 |
if @args > 1 |
|
2012
|
1 |
0 |
unless $resp->is_success |
|
2015
|
0 |
0 |
if _spacetrack_v2_response_is_empty($resp) |
|
2071
|
1 |
0 |
unless (&Scalar::Util::openhandle($file)) |
|
2072
|
0 |
1 |
unless -e $file |
|
2074
|
0 |
1 |
unless my $fh = "IO::File"->new($file, "<") |
|
2108
|
0 |
0 |
if $text eq "" |
|
2124
|
0 |
1 |
wantarray ? : |
|
2132
|
0 |
0 |
if ($value) { } |
|
2136
|
0 |
0 |
if $value & $mask |
|
2159
|
0 |
56 |
unless defined $name |
|
2161
|
0 |
56 |
unless my $code = $accessor{$name} |
|
2193
|
0 |
1 |
if ($self->{'webcmd'}) { } |
|
2195
|
0 |
0 |
if (1 eq $cmd) |
|
2565
|
0 |
0 |
unless defined $fmt |
|
2571
|
0 |
0 |
if (not $opt->{'raw'} or $ignore_raw{$fmt}) |
|
2573
|
0 |
0 |
unless $resp->is_success |
|
2577
|
0 |
0 |
unless ("kelso" eq $fmt) |
|
2578
|
0 |
0 |
unless my $code = $self->can("_iridium_status_$fmt") |
|
2580
|
0 |
0 |
unless ($resp = &$code($self, $fmt, \%rslt))->is_success |
|
2584
|
0 |
0 |
unless ($opt->{'raw'}) |
|
2586
|
0 |
0 |
if $rslt{$body->[0]} and $body->[4] != 3 |
|
2602
|
0 |
0 |
wantarray ? : |
|
2614
|
0 |
0 |
unless $resp->is_success |
|
2620
|
0 |
0 |
if $name =~ s/ \s+ ( [[] .+? []] ) \s* \z //msx |
|
2638
|
0 |
0 |
unless $val->[1] =~ / \A iridium \b /imsx |
|
2673
|
0 |
0 |
unless $resp->is_success |
|
2677
|
0 |
0 |
if ($rslt->{$id}[1] =~ / dummy /imsx) |
|
2682
|
0 |
0 |
unless $rslt->{$id}[1] =~ / (\d+) /msx |
|
2702
|
0 |
0 |
if (/ < -+ \s+ failed \s+ (?: or \s+ retired \s+ )? -+ > /imsx) { } |
|
|
0 |
0 |
elsif (s/ \A \s* ( plane \s+ \d+ ) \s* : \s* //imsx) { } |
|
|
0 |
0 |
elsif (/ Notes: /msx) { } |
|
2716
|
0 |
0 |
unless (my $id = $oid{$num}) |
|
2723
|
0 |
0 |
if ($fail) { } |
|
2728
|
0 |
0 |
$inx > 10 ? : |
|
2732
|
0 |
0 |
if exists $exception{$num} |
|
2770
|
0 |
0 |
unless $resp->is_success |
|
2775
|
0 |
0 |
unless $body->{'LAUNCH_YEAR'} < 2017 |
|
2780
|
0 |
0 |
if $rslt->{$oid} and not $body->{'DECAY'} |
|
2785
|
0 |
0 |
defined $body->{'DECAY'} ? : |
|
2858
|
0 |
1 |
unless $resp->is_success |
|
2867
|
0 |
1 |
if "json" ne $format |
|
2877
|
0 |
34 |
if defined $datum->{'SITE_CODE'} |
|
2880
|
0 |
1 |
if ($opt->{'json'}) { } |
|
2895
|
1 |
0 |
unless wantarray |
|
2927
|
0 |
2 |
if @args |
|
2928
|
0 |
2 |
unless $self->{'username'} and $self->{'password'} |
|
2931
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
2953
|
0 |
2 |
unless $resp->is_success |
|
2957
|
0 |
2 |
if $resp->content =~ / \b failed \b /imsx |
|
2960
|
0 |
2 |
unless $self->_record_cookie_generic(2) |
|
2963
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
2982
|
8 |
4 |
unless $spacetrack_interface_info |
|
2985
|
4 |
0 |
if exists $spacetrack_interface_info->{'session_cookie'} |
|
2987
|
4 |
0 |
if exists $spacetrack_interface_info->{'cookie_expires'} |
|
3084
|
0 |
2 |
if defined $info->{'member'} |
|
3085
|
0 |
2 |
unless IO::Uncompress::Unzip::unzip(\$resp->content, \$content, @zip_opt) |
|
3122
|
1 |
1 |
unless my $src = $self->__catalog($name) |
|
3128
|
0 |
55 |
defined $src->{$cat}{'number'} ? : |
|
3132
|
3 |
52 |
if defined $src->{$cat}{'note'} |
|
3135
|
1 |
0 |
unless wantarray |
|
3141
|
0 |
0 |
if defined $src->{$cat}{'note'} |
|
3263
|
1 |
30 |
unless @args = $self->_expand_oid_list(@args) |
|
3274
|
10 |
20 |
$no_execute ? : |
|
3293
|
0 |
32 |
unless $resp->is_success or $resp->code == 418 |
|
3301
|
0 |
30 |
unless my $data = &$accumulator($self) |
|
3304
|
0 |
30 |
if ref $data |
|
3307
|
10 |
20 |
if $no_execute |
|
3326
|
0 |
35 |
unless my $code = $self->can($method) |
|
3347
|
4 |
31 |
if ($opt->{'start_epoch'} or $opt->{'end_epoch'}) |
|
3355
|
1 |
34 |
$opt->{'descending'} ? : |
|
3357
|
1 |
34 |
if ($opt->{'since_file'}) |
|
3362
|
0 |
35 |
if ($opt->{'status'} and $opt->{'status'} ne "onorbit") |
|
3371
|
35 |
175 |
if defined $opt->{$name} |
|
3374
|
31 |
4 |
if ("legacy" eq $rest{'format'}) |
|
3375
|
9 |
22 |
if ($self->{'with_name'}) { } |
|
3378
|
9 |
0 |
unless defined $rest{'predicates'} |
|
3384
|
0 |
35 |
if $opt->{'last5'} |
|
3417
|
10 |
110 |
unless not defined $_->[0] |
|
3438
|
12 |
38 |
if ($pred eq "NORAD_CAT_ID") |
|
3440
|
0 |
12 |
unless @args = $self->_expand_oid_list(@args) |
|
3456
|
50 |
0 |
if ($opt->{'tle'} or 'legacy' eq $opt->{'format'}) { } |
|
3464
|
0 |
50 |
defined $rest_args->{'class'} ? : |
|
3478
|
31 |
19 |
unless $rslt->is_success |
|
3486
|
14 |
5 |
if ($opt->{'tle'}) { } |
|
3488
|
0 |
14 |
unless defined $opt->{'format'} |
|
3489
|
0 |
14 |
unless "ARRAY" eq ref $data |
|
3500
|
5 |
0 |
if ("legacy" eq $opt->{'format'}) |
|
3511
|
106 |
26 |
defined $datum->{$_} ? : |
|
3524
|
0 |
5 |
if wantarray and $data |
|
3549
|
0 |
50 |
unless %args |
|
3553
|
50 |
0 |
unless exists $args{'class'} |
|
3556
|
50 |
0 |
unless $args{'class'} ne "satcat" or exists $args{'CURRENT'} |
|
3558
|
0 |
50 |
unless exists $args{'format'} |
|
3560
|
50 |
0 |
unless exists $args{'predicates'} |
|
3562
|
50 |
0 |
unless exists $args{'orderby'} |
|
3975
|
0 |
1 |
if $lo > $hi |
|
3976
|
0 |
1 |
unless $lo |
|
3977
|
0 |
1 |
if ($hi - $lo >= $self->{'max_range'}) |
|
4008
|
0 |
0 |
unless @{$cmd_line;} % 2 |
|
4020
|
0 |
52 |
unless $mutator{$name} |
|
4026
|
0 |
46 |
if @args |
|
4195
|
1 |
0 |
_instance($args[0], __PACKAGE__) ? : |
|
4204
|
0 |
1 |
if $self->{'banner'} and not $self->{'filter'} |
|
4214
|
4 |
0 |
if (@args) { } |
|
4220
|
0 |
0 |
$interactive ? : |
|
4223
|
0 |
4 |
unless defined $buffer |
|
4227
|
1 |
3 |
unless $buffer |
|
4228
|
1 |
2 |
if $buffer =~ / \A [#] /msx |
|
4241
|
0 |
4 |
$redir =~ / \A >+ \z /msx ? : |
|
|
0 |
4 |
if (/ \A > /msx) { } |
|
|
0 |
4 |
elsif ($redir =~ / \A >+ \z /msx) { } |
|
4250
|
0 |
2 |
if $redir ne "" |
|
4264
|
0 |
0 |
unless $def->{$key} |
|
4273
|
1 |
1 |
if $verb eq "exit" or $verb eq "bye" |
|
4275
|
0 |
1 |
if ($verb eq "source") |
|
4276
|
0 |
0 |
unless eval {
do {
splice @args, 0, 0, $self->_source(shift @cmdarg);
1
}
} |
|
4286
|
0 |
1 |
unless ($verb ne "new" and $verb ne "shell" and not $verb =~ / \A _ [^_] /msx) |
|
4293
|
0 |
1 |
if ($redir) { } |
|
4294
|
0 |
0 |
unless ($out = "IO::File"->new($redir)) |
|
4310
|
0 |
1 |
if ($verb eq 'get' and @cmdarg == 0) { } |
|
4314
|
0 |
0 |
defined $val ? : |
|
4320
|
0 |
1 |
unless (eval {
do {
$rslt = $self->$verb(@cmdarg);
1
}
}) |
|
4330
|
0 |
1 |
if ('ARRAY' eq ref $rslt) { } |
|
|
0 |
1 |
elsif (not ref $rslt) { } |
|
|
1 |
0 |
elsif ($rslt->is_success) { } |
|
4337
|
0 |
1 |
unless $self->content_type or not $self->{'filter'} |
|
4346
|
0 |
0 |
if $rslt->code == 418 |
|
4351
|
0 |
1 |
if $interactive and not $self->{'filter'} |
|
4360
|
0 |
1 |
if @_ > 1 |
|
4362
|
0 |
1 |
if ("Term::ReadLine::Perl" eq $rdln->ReadLine) |
|
4392
|
0 |
0 |
_instance($_[0], __PACKAGE__) ? : |
|
4487
|
0 |
0 |
unless my $code = $unpack_query{ref $arg} |
|
4515
|
1 |
4 |
unless defined $catalog and my $info = $catalogs{'spacetrack'}[2]{$catalog} |
|
4519
|
0 |
4 |
if defined $info->{'deprecate'} |
|
4521
|
1 |
3 |
if (defined $info->{'favorite'}) |
|
4532
|
3 |
0 |
if $info->{'tle'} |
|
4536
|
0 |
3 |
if ($info->{'satcat'}) { } |
|
4552
|
0 |
0 |
unless $rslt->is_success |
|
4566
|
0 |
0 |
unless $rslt->is_success |
|
4576
|
2 |
1 |
unless $rslt->is_success |
|
4648
|
92 |
0 |
unless $SPACETRACK_DELAY_SECONDS |
|
4650
|
0 |
0 |
if $self->{'dump_headers'} & 4 |
|
4652
|
0 |
0 |
if (defined $spacetrack_delay_until) |
|
4654
|
0 |
0 |
if $now < $spacetrack_delay_until |
|
4692
|
46 |
46 |
if (my $resp = $self->_dump_request("args", \@args, "method", "GET", "url", $uri, "version", 2)) |
|
4702
|
1 |
45 |
unless ($self->_check_cookie_generic(2)) |
|
4704
|
0 |
1 |
unless $resp->is_success |
|
4711
|
46 |
0 |
if ($resp->is_success) |
|
4713
|
0 |
46 |
if ($self->{'pretty'} and _find_rest_arg_value(\@args, "format", "json") eq "json") |
|
4721
|
2 |
44 |
if (__PACKAGE__ ne caller) |
|
4728
|
1 |
1 |
if ('modeldef' eq $kind) { } |
|
|
1 |
0 |
elsif ('query' eq $kind and $tle_class{$class}) { } |
|
4756
|
4 |
4 |
if $args->[$inx] eq $name |
|
4849
|
0 |
0 |
if delete $opt->{'start_epoch'} |
|
4851
|
0 |
0 |
if delete $opt->{'end_epoch'} |
|
4857
|
0 |
0 |
unless open my $fh, "<", $fn |
|
4869
|
0 |
0 |
defined $datum->{'_file_of_record'} ? : |
|
4870
|
0 |
0 |
if $ff > $file |
|
4875
|
0 |
0 |
unless defined $opt->{'since_file'} |
|
4877
|
0 |
0 |
$self->getv('with_name') ? : |
|
|
0 |
0 |
delete $opt->{'json'} ? : |
|
4883
|
0 |
0 |
if ($resp->code == 404) { } |
|
4894
|
0 |
0 |
unless $resp->is_success |
|
4904
|
0 |
0 |
unless open my $fh, ">", $fn |
|
4991
|
49 |
51 |
unless defined $resp |
|
4994
|
0 |
51 |
unless defined $content and $content ne "" |
|
4999
|
1 |
50 |
if $context->{'opt'}{'file'} and $data |
|
5009
|
0 |
1 |
if (defined $context->{'file'}) { } |
|
5013
|
0 |
0 |
if defined $datum->{'FILE'} and $datum->{'FILE'} > $context->{'file'} |
|
5050
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5064
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5085
|
0 |
31 |
unless "ARRAY" eq ref $data |
|
5088
|
1 |
30 |
unless @{$data;} |
|
5091
|
1 |
29 |
if ($context->{'data'}) { } |
|
5112
|
19 |
11 |
wantarray ? : |
|
5118
|
0 |
0 |
if defined $context->{'data'} |
|
5135
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5152
|
0 |
2 |
unless defined $version |
|
5159
|
0 |
2 |
if $self->{'dump_headers'} & 8 |
|
5161
|
0 |
2 |
unless $_[4] eq $domain |
|
5163
|
0 |
2 |
unless $_[3] eq "/" |
|
5165
|
0 |
2 |
unless $_[1] eq $cookie_name |
|
5174
|
2 |
0 |
if $version == 2 and not defined $expires |
|
5178
|
2 |
0 |
if (defined $cookie) { } |
|
5180
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
5182
|
2 |
0 |
if (exists $interface_info->{'cookie_expires'}) |
|
5184
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
5190
|
0 |
0 |
$interface_info->{'session_cookie'} ? : |
|
5192
|
0 |
0 |
if $self->{'dump_headers'} & 1 |
|
5201
|
0 |
46 |
unless defined $version |
|
5204
|
46 |
0 |
if (exists $interface_info->{'cookie_expires'}) { } |
|
5228
|
0 |
27 |
unless defined $buffer |
|
5232
|
1 |
26 |
unless $buffer =~ / \n \z /msx |
|
5303
|
0 |
73 |
unless defined $method |
|
5305
|
0 |
73 |
unless my $level = $deprecate{$method} |
|
5308
|
73 |
0 |
if (ref $level) |
|
5309
|
0 |
73 |
unless defined $argument |
|
5310
|
73 |
0 |
unless $level = $level->{$argument} |
|
5314
|
0 |
0 |
if $level >= 3 |
|
5316
|
0 |
0 |
if warnings::enabled("deprecated") |
|
5318
|
0 |
0 |
unless 1 == $level |
|
5320
|
0 |
0 |
if (ref $deprecate{$method}) { } |
|
5358
|
0 |
0 |
if $prefix |
|
5375
|
0 |
110 |
if ($self->{'dump_headers'} & 16) |
|
5377
|
0 |
0 |
if ($self->{'dump_headers'} & 32 and 61 < length $content) |
|
5384
|
0 |
0 |
@val > 1 ? : |
|
5386
|
0 |
0 |
if (my $rqst = $resp->request) |
|
5394
|
0 |
0 |
unless defined $message |
|
5414
|
62 |
46 |
unless $self->{'dump_headers'} & 2 |
|
5418
|
46 |
0 |
unless defined $message |
|
5422
|
0 |
46 |
unless my $json = $self->_get_json_object("pretty", 1) |
|
5426
|
184 |
0 |
unless "CODE" eq ref $args{$key} |
|
5431
|
46 |
0 |
if $self->{'dump_headers'} & 4 |
|
5444
|
22 |
57 |
unless defined $arg{'pretty'} |
|
5447
|
56 |
23 |
if $arg{'pretty'} |
|
5463
|
1 |
207 |
if (my($lo, $hi) = $arg =~ / \A \s* ( \d+ ) \s* - \s* ( \d+ ) \s* \z /msx) { } |
|
|
207 |
0 |
elsif ($arg =~ / \A \s* ( \d+ ) \s* \z /msx) { } |
|
5466
|
1 |
0 |
if ($lo, $hi) = $self->_check_range($lo, $hi) |
|
5487
|
25 |
0 |
if ('ARRAY' eq ref $lgl_opts) { } |
|
5514
|
4 |
10 |
if @parts >= 3 |
|
5516
|
9 |
1 |
if @parts >= 2 |
|
5527
|
0 |
14 |
unless my(@parts) = _parse_launch_date($date) |
|
5529
|
14 |
0 |
if @parts >= 3 |
|
5531
|
0 |
0 |
if @parts >= 2 |
|
5555
|
53 |
4 |
if $self->{'agent'} |
|
5564
|
4 |
0 |
unless $agent->cookie_jar |
|
5611
|
0 |
8 |
defined $arg{'method'} ? : |
|
5616
|
5 |
3 |
if (defined $arg{'url'}) { } |
|
|
3 |
0 |
elsif (exists $arg{'catalog'}) { } |
|
5623
|
1 |
2 |
unless defined $arg{'catalog'} and $catalogs{$method} and $info = $catalogs{$method}{$arg{'catalog'}} |
|
5626
|
0 |
2 |
unless $url = $info->{'url'} |
|
5631
|
0 |
7 |
if (my $resp = $self->_dump_request("args", {map({$_, "CODE" eq ref $arg{$_} ? "sub { ... }" : $arg{$_};} keys %arg)}, "method", "GET", "url", $url, "version", 2)) |
|
5632
|
7 |
18 |
'CODE' eq ref $arg{$_} ? : |
|
5643
|
0 |
7 |
if (defined $arg{'file'}) |
|
5644
|
0 |
0 |
if (my(@stat) = stat $arg{'file'}) |
|
5656
|
0 |
0 |
if delete $sanitary{$key} |
|
5667
|
0 |
0 |
@v == 1 ? : |
|
5672
|
0 |
7 |
if $resp = $self->_dump_request("arg", sub {
my(%sanitary) = %arg;
foreach my $key ("post_process") {
$sanitary{$key} = "CODE" if delete $sanitary{$key};
};
return \%sanitary;
}
, "message", "_get_from_net() request object", "method", "GET", "url", $url, "hdrs", sub {
my %rslt;
foreach my $name ($rqst->header_field_names) {
my(@v) = $rqst->header($name);
$rslt{$name} = @v == 1 ? $v[0] : \@v;
};
return \%rslt;
}
) |
|
5677
|
0 |
7 |
if ($resp->code == 304) { } |
|
5679
|
0 |
0 |
unless defined $arg{'file'} |
|
5682
|
0 |
0 |
unless open my $fh, "<", $arg{'file'} |
|
5688
|
0 |
0 |
if defined $file_time |
|
5694
|
7 |
0 |
if $resp->is_success and defined $arg{'post_process'} |
|
5695
|
1 |
6 |
unless $resp->is_success |
|
5698
|
0 |
6 |
if (defined $arg{'file'}) |
|
5700
|
0 |
0 |
unless open my $fh, ">", $arg{'file'} |
|
5713
|
0 |
2 |
defined $info->{'spacetrack_source'} ? : |
|
|
2 |
4 |
unless defined $arg{'spacetrack_source'} |
|
5718
|
2 |
6 |
defined $info->{$_} ? : |
|
|
10 |
8 |
if (defined $arg{$_}) { } |
|
5735
|
2 |
94 |
unless defined $version |
|
5774
|
0 |
1 |
unless my($id) = / \A ( [\s\d]{5} ) /msx |
|
5775
|
0 |
1 |
unless $id =~ / \A \s* \d+ \z /msx |
|
5782
|
0 |
1 |
if ($opt->{'observing_list'}) { } |
|
5784
|
0 |
0 |
/ \n \z /msx ? : |
|
5794
|
1 |
0 |
if ($resp->is_success) |
|
5796
|
0 |
1 |
unless ($self->{'_pragmata'}) |
|
5805
|
0 |
1 |
wantarray ? : |
|
5813
|
0 |
1 |
unless ref $object |
|
5814
|
0 |
1 |
unless builtin::blessed($object) |
|
5836
|
0 |
0 |
unless $resp->code == 500 |
|
5838
|
0 |
0 |
unless (my $msg = $resp->message) =~ s/ ( [(] certificate\ verify\ failed ) [)]/$1; try setting the verify_hostname attribute false)/msx |
|
5858
|
0 |
22 |
if ($value =~ / \A --? /msx) { } |
|
5865
|
0 |
0 |
if ($_[1]) |
|
5875
|
0 |
22 |
if $value =~ / \A 0 (?: [0-7]+ | x [[:xdigit:]]+ ) \z /msx |
|
5899
|
0 |
0 |
if -e $gpg_file |
|
5909
|
0 |
0 |
if -B $fn |
|
5911
|
0 |
0 |
unless open my $fh, "<:encoding(utf-8)", $fn |
|
5922
|
14 |
0 |
unless defined $value |
|
5923
|
0 |
14 |
if ($value and my $identity = __spacetrack_identity()) |
|
5948
|
0 |
0 |
if $loaded |
|
5952
|
0 |
0 |
unless -f $fn |
|
5956
|
0 |
0 |
unless eval {
do {
require Config::Identity;
$identity = {"Config::Identity"->load($fn)};
1
}
} |
|
5963
|
0 |
0 |
unless exists $identity->{$key} |
|
5966
|
0 |
0 |
if scalar keys %{$identity;} > 2 |
|
5982
|
0 |
0 |
unless exists $spacetrack_interface_info->{$name} |
|
5985
|
0 |
0 |
if $need_logout{$name} |
|
5997
|
0 |
0 |
unless exists $spacetrack_interface_info->{$name} |
|
6016
|
0 |
0 |
unless $catalogs{'iridium_status'}{$_[2]} |
|
6027
|
0 |
0 |
if $_[2] =~ / \D /msx |
|
6039
|
0 |
2 |
unless $value |
|
6042
|
0 |
2 |
unless $value =~ / \A \d+ \z /msx and $self->{'_space_track_interface'}[$value] |
|
6045
|
0 |
2 |
if $value == 1 |
|
6076
|
0 |
3 |
unless my $info = $catalogs{$source} |
|
6079
|
1 |
2 |
if ("ARRAY" eq ref $info) |
|
6081
|
0 |
1 |
unless $info = $info->[$inx] |
|
6091
|
0 |
3 |
$info->{$catalog} ? : |
|
|
3 |
0 |
defined $catalog ? : |
|
6095
|
0 |
3 |
defined $note ? : |
|
6098
|
3 |
0 |
unless $self->{'verbose'} |
|
6123
|
14 |
86 |
unless ("ARRAY" eq ref $lgl_opts) |
|
6127
|
0 |
14 |
unless my $code = $pkg->can("_${caller}_opts") |
|
6132
|
18 |
82 |
if ('HASH' eq ref $args[0]) { } |
|
6136
|
18 |
0 |
unless ($ENV{'SPACETRACK_SKIP_OPTION_HASH_VALIDATION'}) |
|
6140
|
0 |
47 |
unless $lgl{$key} |
|
6147
|
0 |
18 |
if @bad |
|
6161
|
0 |
82 |
unless $go->getoptionsfromarray(\@args, $opt, keys %lgl) |
|
6174
|
0 |
0 |
$arg{'carp'} ? : |
|
6175
|
0 |
0 |
if (defined $arg{'name'}) |
|
6178
|
0 |
0 |
'ARRAY' eq ref $arg{'name'} ? : |
|
6180
|
0 |
0 |
unless @names |
|
6181
|
0 |
0 |
@names > 1 ? : |
|
6185
|
0 |
0 |
if (defined $arg{'legal'}) |
|
6198
|
0 |
0 |
if defined $arg{'suffix'} |
|
6200
|
0 |
0 |
unless $arg{'carp'} |
|
6217
|
0 |
14 |
if ($intl_id =~ / \A ( \d+ ) [^[:alpha:][:digit:]\s]
(?: ( \d{1,3} ) ( [[:alpha:]]* ) )? \z /msx) { } |
|
|
14 |
0 |
elsif ($intl_id =~ / \A ( \d\d ) (?: ( \d{3} ) ( [[:alpha:]]* ) )? /msx) { } |
|
6230
|
14 |
0 |
$year < 100 ? : |
|
|
0 |
14 |
$year < 57 ? : |
|
6232
|
1 |
13 |
unless $launch |
|
6235
|
4 |
9 |
if $part |
|
6248
|
0 |
14 |
unless my($year, $month, $day) = $date =~ / \A (\d+) (?:\D+ (\d+) (?: \D+ (\d+) )? )? /msx |
|
6251
|
0 |
14 |
$year < 100 ? : |
|
|
0 |
14 |
$year < 57 ? : |
|
6253
|
0 |
14 |
unless defined $month |
|
6256
|
14 |
0 |
if defined $day |
|
6286
|
50 |
32 |
'ARRAY' eq ref $args[0] ? : |
|
6292
|
50 |
32 |
$extra_options ? : |
|
6325
|
0 |
5 |
$opt->{'tle'} ? : |
|
|
5 |
77 |
defined $opt->{'tle'} ? : |
|
|
82 |
9 |
unless defined $table |
|
6329
|
0 |
2 |
if $opt->{'json'} and defined $opt->{'format'} and $opt->{'format'} ne "json" |
|
6331
|
0 |
91 |
unless $format{$table} |
|
6335
|
1 |
69 |
$opt->{'json'} ? : |
|
|
70 |
21 |
unless defined $opt->{'format'} |
|
6337
|
75 |
16 |
unless exists $opt->{'json'} |
|
6339
|
0 |
91 |
unless $format{$table}{'valid'}{$opt->{'format'}} |
|
6340
|
81 |
10 |
$opt->{'format'} eq 'legacy' ? : |
|
6351
|
65 |
0 |
unless defined $sort |
|
6354
|
0 |
0 |
unless $valid{$sort} |
|
6378
|
57 |
5 |
unless $opt->{$key} |
|
6380
|
5 |
0 |
if ($opt->{$key} =~ / \D /msx) |
|
6382
|
0 |
5 |
unless $str =~ / \A
( \d+ ) \D+ ( \d+ ) \D+ ( \d+ )
(?: \D+ ( \d+ ) (?: \D+ ( \d+ ) (?: \D+ ( \d+ ) )? )? )?
\z /msx |
|
6389
|
15 |
15 |
unless defined $_ |
|
6392
|
5 |
0 |
if ($time[5] > 1900) { } |
|
|
0 |
0 |
elsif ($time[5] < 57) { } |
|
6398
|
0 |
5 |
unless eval {
do {
$opt->{$key} = Time::Local::timegm(@time);
1
}
} |
|
6407
|
4 |
27 |
if ($found) |
|
6409
|
3 |
1 |
if ($found == 1) |
|
6414
|
0 |
4 |
unless $opt->{'start_epoch'} <= $opt->{'end_epoch'} |
|
6459
|
50 |
0 |
if (defined $opt->{'status'}) |
|
6461
|
0 |
50 |
unless defined(my $query = $status_query{$opt->{'status'}}) |
|
6463
|
47 |
3 |
if $query |
|
6469
|
12 |
38 |
if ($opt->{'exclude'} and @{$opt->{'exclude'};}) |
|
6472
|
0 |
18 |
unless $include_map{$_} |
|
6478
|
1 |
49 |
if ($opt->{'include'} and @{$opt->{'include'};}) |
|
6480
|
0 |
1 |
unless $include_map{$_} |
|
6488
|
13 |
37 |
if keys %incl |
|
6512
|
0 |
50 |
'ARRAY' eq ref $args[0] ? : |
|
6520
|
0 |
50 |
unless $legal_search_status{$opt->{'status'}} |
|
6529
|
0 |
19 |
unless $include_map{$_} |
|
6537
|
45 |
5 |
unless defined $opt->{'tle'} |
|
6571
|
0 |
86 |
unless "HASH" eq ref $rest_args |
|
6578
|
0 |
172 |
if @rslt |
|
6580
|
0 |
172 |
if defined $rest_args->{$key} |
|
6603
|
0 |
0 |
unless $start |
|
6611
|
0 |
0 |
if (my $code = $app->can("_readline_complete_command_$cmd")) |
|
6615
|
0 |
0 |
if ($text =~ / \A - /msx and my $code = $app->can("_${cmd}_opts")) |
|
6620
|
0 |
0 |
if $catalogs{$cmd} |
|
6624
|
0 |
0 |
if (1 == @files) { } |
|
|
0 |
0 |
elsif ($readline::var_CompleteAddsuffix) { } |
|
6625
|
0 |
0 |
-d $files[0] ? : |
|
6628
|
0 |
0 |
if (-l $_) { } |
|
|
0 |
0 |
elsif (-d $_) { } |
|
|
0 |
0 |
elsif (-x _) { } |
|
|
0 |
0 |
elsif (-S _ or -p _) { } |
|
6646
|
0 |
0 |
if ("ARRAY" eq ref $this_cat) |
|
6647
|
0 |
0 |
unless my $code = $app->can("_${cat}_catalog_version") |
|
6653
|
0 |
0 |
unless defined $text and $text ne "" |
|
6665
|
0 |
0 |
unless (@builtins) |
|
6670
|
0 |
0 |
if $sym =~ / \A _ /msx |
|
6672
|
0 |
0 |
if $sym =~ / [[:upper:]] /msx |
|
6674
|
0 |
0 |
if $disallow{$sym} |
|
6676
|
0 |
0 |
unless $app->can($sym) |
|
6684
|
0 |
0 |
if 1 == @rslt and $rslt[0] =~ / \W \z /msx |
|
6693
|
0 |
0 |
unless $text =~ / \A ( --? ) ( .* ) /msx |
|
6702
|
0 |
0 |
if (my $o = $_) =~ s/ ( [!=?] ) .* //msx |
|
6706
|
0 |
0 |
if $type eq "!" |
|
6735
|
0 |
0 |
unless wantarray |
|
6738
|
0 |
0 |
unless defined $fn |
|
6741
|
0 |
0 |
unless my $fh = "IO::File"->new($fn, "<") |
|
6770
|
0 |
44 |
unless @args |
|
6772
|
44 |
0 |
defined $opt->{'separator'} ? : |
|
6775
|
44 |
0 |
if (defined $range_operator) { } |
|
6777
|
151 |
59 |
if ('ARRAY' eq ref $rslt[-1]) { } |
|
6778
|
147 |
4 |
if ($arg == $rslt[-1][1] + 1) { } |
|
6781
|
4 |
0 |
if $arg > $rslt[-1][1] |
|
6785
|
11 |
48 |
if ($arg == $rslt[-1] + 1) { } |
|
6788
|
48 |
0 |
if $arg > $rslt[-1] |
|
6799
|
10 |
1 |
$_->[1] > $_->[0] + 1 ? : |
|
|
11 |
41 |
if (ref $_) { } |
|
6830
|
0 |
4 |
unless defined $_ |