| line |
true |
false |
branch |
|
849
|
0 |
7 |
if ref $class |
|
892
|
0 |
7 |
if $ENV{'SPACETRACK_OPT'} |
|
898
|
0 |
7 |
if (defined(my $id = delete $arg{'identity'})) { } |
|
|
0 |
7 |
elsif ($ENV{'SPACETRACK_USER'}) { } |
|
902
|
0 |
0 |
unless "" ne $user and "" ne $pass |
|
912
|
0 |
7 |
if defined $ENV{'SPACETRACK_VERIFY_HOSTNAME'} |
|
914
|
2 |
5 |
if keys %arg |
|
999
|
0 |
0 |
unless ($self->{'with_name'}) |
|
1002
|
0 |
0 |
if @content % 3 |
|
1013
|
0 |
0 |
if "" eq $resp->content |
|
1037
|
0 |
1 |
wantarray ? : |
|
|
1 |
0 |
unless ref $self |
|
1042
|
0 |
0 |
$mutator{$_} == \&Astro::SpaceTrack::_mutate_spacetrack_interface ? : |
|
1045
|
0 |
0 |
wantarray ? : |
|
1065
|
1 |
0 |
if ($] >= 5.01) { } |
|
1171
|
1 |
1 |
unless $resp->is_success |
|
1180
|
0 |
1 |
unless "json" eq $format |
|
1185
|
1 |
0 |
unless ($opt->{'json'}) |
|
1196
|
0 |
100 |
if defined $datum->{'SPADOC_CD'} and $datum->{'SPADOC_CD'} eq "ALL" |
|
1198
|
0 |
1000 |
defined $datum->{$_} ? : |
|
1206
|
1 |
0 |
unless wantarray |
|
1228
|
0 |
2 |
if $name eq "spacetrack" |
|
1325
|
0 |
2 |
unless defined $name |
|
1335
|
0 |
2 |
if ref($query = $self->_celestrak_validate_query(delete $opt->{'query'}, $name, {"CATNR" => 1,"GROUP" => 1,"INTDES" => 1,"NAME" => 1,"SPECIAL" => 1}, "GROUP")) |
|
1341
|
0 |
2 |
if ref($format = $self->_celestrak_validate_format(delete $opt->{'format'})) |
|
1356
|
1 |
1 |
if $check = $self->_celestrak_response_check($resp, "celestrak", $name) |
|
1359
|
0 |
1 |
if $name eq "iridium" |
|
1531
|
0 |
1 |
if $opt->{'rms'} and $opt->{'match'} |
|
1536
|
1 |
1 |
if ($opt->{'rms'} or $opt->{'match'}) |
|
1538
|
0 |
2 |
if defined $opt->{$key} |
|
1552
|
0 |
1 |
unless not $opt->{$key} or $info->{$key} |
|
1562
|
1 |
1 |
if ($opt->{'rms'}) { } |
|
|
0 |
1 |
elsif ($opt->{'match'}) { } |
|
1572
|
1 |
0 |
unless defined $source |
|
1577
|
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")) |
|
1583
|
0 |
1 |
if ref($format = $self->_celestrak_validate_format(delete $opt->{'format'})) |
|
1599
|
0 |
2 |
if $check = $self->_celestrak_response_check($resp, "celestrak_supplemental", $name) |
|
1614
|
0 |
3 |
defined $format ? : |
|
1615
|
0 |
3 |
unless $valid_format{$format} |
|
1619
|
0 |
3 |
if $format eq "JSON" and $self->getv("pretty") |
|
1628
|
3 |
0 |
defined $dflt ? : |
|
|
0 |
3 |
$name =~ / \A [0-9]{4}-[0-9]+ \z /msx ? : |
|
|
0 |
3 |
$name =~ / \A [0-9]+ \z /msx ? : |
|
|
0 |
3 |
defined $query ? : |
|
1632
|
0 |
3 |
unless defined $query |
|
1634
|
0 |
3 |
unless $valid->{$query} |
|
1661
|
0 |
4 |
unless ($resp->is_success) |
|
1662
|
0 |
0 |
if $resp->code == 404 |
|
1670
|
1 |
3 |
if ($content =~ / \A Invalid \s+ query: /msx) |
|
1671
|
1 |
0 |
if $content =~ / \b (?: GROUP | FILE ) =\Q$name\E \s not \s found \b /msx |
|
1680
|
0 |
3 |
if (my $loc = $resp->header("Content-Location")) |
|
1681
|
0 |
0 |
if ($loc =~ / redirect [.] htm [?] ( \d{3} ) ; /msx) |
|
1683
|
0 |
0 |
if @args |
|
1684
|
0 |
0 |
if $1 == 404 |
|
1691
|
0 |
3 |
unless (my $type = lc $resp->header("Content-Type")) |
|
1693
|
0 |
0 |
if @args |
|
1699
|
0 |
3 |
unless $valid_type{$type} |
|
1705
|
0 |
3 |
if /^No GP data found\b/ms |
|
1708
|
0 |
3 |
if /^(?:GROUP|FILE) "[^"]+" does not exist/ms |
|
1713
|
0 |
0 |
if @args |
|
1844
|
76 |
5 |
unless defined $resp |
|
1848
|
2 |
1 |
if / $re \s+ = \s+ (.+) /imsx |
|
1908
|
0 |
1 |
unless $resp->is_success |
|
1917
|
0 |
1 |
unless "json" eq $format |
|
1927
|
0 |
100 |
if defined $datum->{'SPADOC_CD'} |
|
1930
|
0 |
1 |
if ($opt->{'json'}) { } |
|
1992
|
0 |
1 |
unless @args and defined $args[0] |
|
1994
|
0 |
1 |
if @args > 1 |
|
2008
|
1 |
0 |
unless $resp->is_success |
|
2011
|
0 |
0 |
if _spacetrack_v2_response_is_empty($resp) |
|
2067
|
1 |
0 |
unless (&Scalar::Util::openhandle($file)) |
|
2068
|
0 |
1 |
unless -e $file |
|
2070
|
0 |
1 |
unless my $fh = "IO::File"->new($file, "<") |
|
2104
|
0 |
0 |
if $text eq "" |
|
2120
|
0 |
1 |
wantarray ? : |
|
2128
|
0 |
0 |
if ($value) { } |
|
2132
|
0 |
0 |
if $value & $mask |
|
2155
|
0 |
56 |
unless defined $name |
|
2157
|
0 |
56 |
unless my $code = $accessor{$name} |
|
2189
|
0 |
1 |
if ($self->{'webcmd'}) { } |
|
2191
|
0 |
0 |
if (1 eq $cmd) |
|
2561
|
0 |
0 |
unless defined $fmt |
|
2567
|
0 |
0 |
if (not $opt->{'raw'} or $ignore_raw{$fmt}) |
|
2569
|
0 |
0 |
unless $resp->is_success |
|
2573
|
0 |
0 |
unless ("kelso" eq $fmt) |
|
2574
|
0 |
0 |
unless my $code = $self->can("_iridium_status_$fmt") |
|
2576
|
0 |
0 |
unless ($resp = &$code($self, $fmt, \%rslt))->is_success |
|
2580
|
0 |
0 |
unless ($opt->{'raw'}) |
|
2582
|
0 |
0 |
if $rslt{$body->[0]} and $body->[4] != 3 |
|
2598
|
0 |
0 |
wantarray ? : |
|
2610
|
0 |
0 |
unless $resp->is_success |
|
2616
|
0 |
0 |
if $name =~ s/ \s+ ( [[] .+? []] ) \s* \z //msx |
|
2634
|
0 |
0 |
unless $val->[1] =~ / \A iridium \b /imsx |
|
2669
|
0 |
0 |
unless $resp->is_success |
|
2673
|
0 |
0 |
if ($rslt->{$id}[1] =~ / dummy /imsx) |
|
2678
|
0 |
0 |
unless $rslt->{$id}[1] =~ / (\d+) /msx |
|
2698
|
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) { } |
|
2712
|
0 |
0 |
unless (my $id = $oid{$num}) |
|
2719
|
0 |
0 |
if ($fail) { } |
|
2724
|
0 |
0 |
$inx > 10 ? : |
|
2728
|
0 |
0 |
if exists $exception{$num} |
|
2766
|
0 |
0 |
unless $resp->is_success |
|
2771
|
0 |
0 |
unless $body->{'LAUNCH_YEAR'} < 2017 |
|
2776
|
0 |
0 |
if $rslt->{$oid} and not $body->{'DECAY'} |
|
2781
|
0 |
0 |
defined $body->{'DECAY'} ? : |
|
2854
|
0 |
1 |
unless $resp->is_success |
|
2863
|
0 |
1 |
if "json" ne $format |
|
2873
|
0 |
34 |
if defined $datum->{'SITE_CODE'} |
|
2876
|
0 |
1 |
if ($opt->{'json'}) { } |
|
2891
|
1 |
0 |
unless wantarray |
|
2923
|
0 |
2 |
if @args |
|
2924
|
0 |
2 |
unless $self->{'username'} and $self->{'password'} |
|
2927
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
2949
|
0 |
2 |
unless $resp->is_success |
|
2953
|
0 |
2 |
if $resp->content =~ / \b failed \b /imsx |
|
2956
|
0 |
2 |
unless $self->_record_cookie_generic(2) |
|
2959
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
2978
|
8 |
4 |
unless $spacetrack_interface_info |
|
2981
|
4 |
0 |
if exists $spacetrack_interface_info->{'session_cookie'} |
|
2983
|
4 |
0 |
if exists $spacetrack_interface_info->{'cookie_expires'} |
|
3073
|
0 |
2 |
if defined $info->{'member'} |
|
3074
|
0 |
2 |
unless IO::Uncompress::Unzip::unzip(\$resp->content, \$content, @zip_opt) |
|
3111
|
1 |
1 |
unless my $src = $self->__catalog($name) |
|
3117
|
0 |
48 |
defined $src->{$cat}{'number'} ? : |
|
3121
|
2 |
46 |
if defined $src->{$cat}{'note'} |
|
3124
|
1 |
0 |
unless wantarray |
|
3130
|
0 |
0 |
if defined $src->{$cat}{'note'} |
|
3252
|
1 |
30 |
unless @args = $self->_expand_oid_list(@args) |
|
3263
|
10 |
20 |
$no_execute ? : |
|
3282
|
0 |
32 |
unless $resp->is_success or $resp->code == 418 |
|
3290
|
0 |
30 |
unless my $data = &$accumulator($self) |
|
3293
|
0 |
30 |
if ref $data |
|
3296
|
10 |
20 |
if $no_execute |
|
3315
|
0 |
35 |
unless my $code = $self->can($method) |
|
3336
|
4 |
31 |
if ($opt->{'start_epoch'} or $opt->{'end_epoch'}) |
|
3344
|
1 |
34 |
$opt->{'descending'} ? : |
|
3346
|
1 |
34 |
if ($opt->{'since_file'}) |
|
3351
|
0 |
35 |
if ($opt->{'status'} and $opt->{'status'} ne "onorbit") |
|
3360
|
35 |
175 |
if defined $opt->{$name} |
|
3363
|
31 |
4 |
if ("legacy" eq $rest{'format'}) |
|
3364
|
9 |
22 |
if ($self->{'with_name'}) { } |
|
3367
|
9 |
0 |
unless defined $rest{'predicates'} |
|
3373
|
0 |
35 |
if $opt->{'last5'} |
|
3406
|
10 |
110 |
unless not defined $_->[0] |
|
3427
|
12 |
38 |
if ($pred eq "NORAD_CAT_ID") |
|
3429
|
0 |
12 |
unless @args = $self->_expand_oid_list(@args) |
|
3445
|
50 |
0 |
if ($opt->{'tle'} or 'legacy' eq $opt->{'format'}) { } |
|
3453
|
0 |
50 |
defined $rest_args->{'class'} ? : |
|
3467
|
31 |
19 |
unless $rslt->is_success |
|
3475
|
14 |
5 |
if ($opt->{'tle'}) { } |
|
3477
|
0 |
14 |
unless defined $opt->{'format'} |
|
3478
|
0 |
14 |
unless "ARRAY" eq ref $data |
|
3489
|
5 |
0 |
if ("legacy" eq $opt->{'format'}) |
|
3500
|
106 |
26 |
defined $datum->{$_} ? : |
|
3513
|
0 |
5 |
if wantarray and $data |
|
3538
|
0 |
50 |
unless %args |
|
3542
|
50 |
0 |
unless exists $args{'class'} |
|
3545
|
50 |
0 |
unless $args{'class'} ne "satcat" or exists $args{'CURRENT'} |
|
3547
|
0 |
50 |
unless exists $args{'format'} |
|
3549
|
50 |
0 |
unless exists $args{'predicates'} |
|
3551
|
50 |
0 |
unless exists $args{'orderby'} |
|
3964
|
0 |
1 |
if $lo > $hi |
|
3965
|
0 |
1 |
unless $lo |
|
3966
|
0 |
1 |
if ($hi - $lo >= $self->{'max_range'}) |
|
3997
|
0 |
0 |
unless @{$cmd_line;} % 2 |
|
4009
|
0 |
52 |
unless $mutator{$name} |
|
4015
|
0 |
46 |
if @args |
|
4184
|
1 |
0 |
_instance($args[0], __PACKAGE__) ? : |
|
4193
|
0 |
1 |
if $self->{'banner'} and not $self->{'filter'} |
|
4203
|
4 |
0 |
if (@args) { } |
|
4209
|
0 |
0 |
$interactive ? : |
|
4212
|
0 |
4 |
unless defined $buffer |
|
4216
|
1 |
3 |
unless $buffer |
|
4217
|
1 |
2 |
if $buffer =~ / \A [#] /msx |
|
4230
|
0 |
4 |
$redir =~ / \A >+ \z /msx ? : |
|
|
0 |
4 |
if (/ \A > /msx) { } |
|
|
0 |
4 |
elsif ($redir =~ / \A >+ \z /msx) { } |
|
4239
|
0 |
2 |
if $redir ne "" |
|
4253
|
0 |
0 |
unless $def->{$key} |
|
4262
|
1 |
1 |
if $verb eq "exit" or $verb eq "bye" |
|
4264
|
0 |
1 |
if ($verb eq "source") |
|
4265
|
0 |
0 |
unless eval {
do {
splice @args, 0, 0, $self->_source(shift @cmdarg);
1
}
} |
|
4275
|
0 |
1 |
unless ($verb ne "new" and $verb ne "shell" and not $verb =~ / \A _ [^_] /msx) |
|
4282
|
0 |
1 |
if ($redir) { } |
|
4283
|
0 |
0 |
unless ($out = "IO::File"->new($redir)) |
|
4299
|
0 |
1 |
if ($verb eq 'get' and @cmdarg == 0) { } |
|
4303
|
0 |
0 |
defined $val ? : |
|
4309
|
0 |
1 |
unless (eval {
do {
$rslt = $self->$verb(@cmdarg);
1
}
}) |
|
4319
|
0 |
1 |
if ('ARRAY' eq ref $rslt) { } |
|
|
0 |
1 |
elsif (not ref $rslt) { } |
|
|
1 |
0 |
elsif ($rslt->is_success) { } |
|
4326
|
0 |
1 |
unless $self->content_type or not $self->{'filter'} |
|
4335
|
0 |
0 |
if $rslt->code == 418 |
|
4340
|
0 |
1 |
if $interactive and not $self->{'filter'} |
|
4349
|
0 |
1 |
if @_ > 1 |
|
4351
|
0 |
1 |
if ("Term::ReadLine::Perl" eq $rdln->ReadLine) |
|
4381
|
0 |
0 |
_instance($_[0], __PACKAGE__) ? : |
|
4476
|
0 |
0 |
unless my $code = $unpack_query{ref $arg} |
|
4504
|
1 |
4 |
unless defined $catalog and my $info = $catalogs{'spacetrack'}[2]{$catalog} |
|
4508
|
0 |
4 |
if defined $info->{'deprecate'} |
|
4510
|
1 |
3 |
if (defined $info->{'favorite'}) |
|
4521
|
3 |
0 |
if $info->{'tle'} |
|
4525
|
0 |
3 |
if ($info->{'satcat'}) { } |
|
4541
|
0 |
0 |
unless $rslt->is_success |
|
4555
|
0 |
0 |
unless $rslt->is_success |
|
4565
|
2 |
1 |
unless $rslt->is_success |
|
4637
|
92 |
0 |
unless $SPACETRACK_DELAY_SECONDS |
|
4639
|
0 |
0 |
if $self->{'dump_headers'} & 4 |
|
4641
|
0 |
0 |
if (defined $spacetrack_delay_until) |
|
4643
|
0 |
0 |
if $now < $spacetrack_delay_until |
|
4681
|
46 |
46 |
if (my $resp = $self->_dump_request("args", \@args, "method", "GET", "url", $uri, "version", 2)) |
|
4691
|
1 |
45 |
unless ($self->_check_cookie_generic(2)) |
|
4693
|
0 |
1 |
unless $resp->is_success |
|
4700
|
46 |
0 |
if ($resp->is_success) |
|
4702
|
0 |
46 |
if ($self->{'pretty'} and _find_rest_arg_value(\@args, "format", "json") eq "json") |
|
4710
|
2 |
44 |
if (__PACKAGE__ ne caller) |
|
4717
|
1 |
1 |
if ('modeldef' eq $kind) { } |
|
|
1 |
0 |
elsif ('query' eq $kind and $tle_class{$class}) { } |
|
4745
|
4 |
4 |
if $args->[$inx] eq $name |
|
4838
|
0 |
0 |
if delete $opt->{'start_epoch'} |
|
4840
|
0 |
0 |
if delete $opt->{'end_epoch'} |
|
4846
|
0 |
0 |
unless open my $fh, "<", $fn |
|
4858
|
0 |
0 |
defined $datum->{'_file_of_record'} ? : |
|
4859
|
0 |
0 |
if $ff > $file |
|
4864
|
0 |
0 |
unless defined $opt->{'since_file'} |
|
4866
|
0 |
0 |
$self->getv('with_name') ? : |
|
|
0 |
0 |
delete $opt->{'json'} ? : |
|
4872
|
0 |
0 |
if ($resp->code == 404) { } |
|
4883
|
0 |
0 |
unless $resp->is_success |
|
4893
|
0 |
0 |
unless open my $fh, ">", $fn |
|
4980
|
49 |
51 |
unless defined $resp |
|
4983
|
0 |
51 |
unless defined $content and $content ne "" |
|
4988
|
1 |
50 |
if $context->{'opt'}{'file'} and $data |
|
4998
|
0 |
1 |
if (defined $context->{'file'}) { } |
|
5002
|
0 |
0 |
if defined $datum->{'FILE'} and $datum->{'FILE'} > $context->{'file'} |
|
5039
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5053
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5074
|
0 |
31 |
unless "ARRAY" eq ref $data |
|
5077
|
1 |
30 |
unless @{$data;} |
|
5080
|
1 |
29 |
if ($context->{'data'}) { } |
|
5101
|
19 |
11 |
wantarray ? : |
|
5107
|
0 |
0 |
if defined $context->{'data'} |
|
5124
|
0 |
0 |
if (defined $context->{'data'}) { } |
|
5141
|
0 |
2 |
unless defined $version |
|
5148
|
0 |
2 |
if $self->{'dump_headers'} & 8 |
|
5150
|
0 |
2 |
unless $_[4] eq $domain |
|
5152
|
0 |
2 |
unless $_[3] eq "/" |
|
5154
|
0 |
2 |
unless $_[1] eq $cookie_name |
|
5163
|
2 |
0 |
if $version == 2 and not defined $expires |
|
5167
|
2 |
0 |
if (defined $cookie) { } |
|
5169
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
5171
|
2 |
0 |
if (exists $interface_info->{'cookie_expires'}) |
|
5173
|
0 |
2 |
if $self->{'dump_headers'} & 1 |
|
5179
|
0 |
0 |
$interface_info->{'session_cookie'} ? : |
|
5181
|
0 |
0 |
if $self->{'dump_headers'} & 1 |
|
5190
|
0 |
46 |
unless defined $version |
|
5193
|
46 |
0 |
if (exists $interface_info->{'cookie_expires'}) { } |
|
5217
|
0 |
26 |
unless defined $buffer |
|
5221
|
1 |
25 |
unless $buffer =~ / \n \z /msx |
|
5293
|
0 |
73 |
unless defined $method |
|
5295
|
0 |
73 |
unless my $level = $deprecate{$method} |
|
5298
|
73 |
0 |
if (ref $level) |
|
5299
|
0 |
73 |
unless defined $argument |
|
5300
|
73 |
0 |
unless $level = $level->{$argument} |
|
5304
|
0 |
0 |
if $level >= 3 |
|
5306
|
0 |
0 |
if warnings::enabled("deprecated") |
|
5308
|
0 |
0 |
unless 1 == $level |
|
5310
|
0 |
0 |
if (ref $deprecate{$method}) { } |
|
5348
|
0 |
0 |
if $prefix |
|
5365
|
0 |
108 |
if ($self->{'dump_headers'} & 16) |
|
5367
|
0 |
0 |
if ($self->{'dump_headers'} & 32 and 61 < length $content) |
|
5374
|
0 |
0 |
@val > 1 ? : |
|
5376
|
0 |
0 |
if (my $rqst = $resp->request) |
|
5384
|
0 |
0 |
unless defined $message |
|
5404
|
60 |
46 |
unless $self->{'dump_headers'} & 2 |
|
5408
|
46 |
0 |
unless defined $message |
|
5412
|
0 |
46 |
unless my $json = $self->_get_json_object("pretty", 1) |
|
5416
|
184 |
0 |
unless "CODE" eq ref $args{$key} |
|
5421
|
46 |
0 |
if $self->{'dump_headers'} & 4 |
|
5434
|
22 |
57 |
unless defined $arg{'pretty'} |
|
5437
|
56 |
23 |
if $arg{'pretty'} |
|
5453
|
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) { } |
|
5456
|
1 |
0 |
if ($lo, $hi) = $self->_check_range($lo, $hi) |
|
5477
|
25 |
0 |
if ('ARRAY' eq ref $lgl_opts) { } |
|
5504
|
4 |
10 |
if @parts >= 3 |
|
5506
|
9 |
1 |
if @parts >= 2 |
|
5517
|
0 |
14 |
unless my(@parts) = _parse_launch_date($date) |
|
5519
|
14 |
0 |
if @parts >= 3 |
|
5521
|
0 |
0 |
if @parts >= 2 |
|
5545
|
52 |
4 |
if $self->{'agent'} |
|
5554
|
4 |
0 |
unless $agent->cookie_jar |
|
5601
|
0 |
7 |
defined $arg{'method'} ? : |
|
5606
|
4 |
3 |
if (defined $arg{'url'}) { } |
|
|
3 |
0 |
elsif (exists $arg{'catalog'}) { } |
|
5613
|
1 |
2 |
unless defined $arg{'catalog'} and $catalogs{$method} and $info = $catalogs{$method}{$arg{'catalog'}} |
|
5616
|
0 |
2 |
unless $url = $info->{'url'} |
|
5621
|
0 |
6 |
if (my $resp = $self->_dump_request("args", {map({$_, "CODE" eq ref $arg{$_} ? "sub { ... }" : $arg{$_};} keys %arg)}, "method", "GET", "url", $url, "version", 2)) |
|
5622
|
6 |
15 |
'CODE' eq ref $arg{$_} ? : |
|
5633
|
0 |
6 |
if (defined $arg{'file'}) |
|
5634
|
0 |
0 |
if (my(@stat) = stat $arg{'file'}) |
|
5646
|
0 |
0 |
if delete $sanitary{$key} |
|
5657
|
0 |
0 |
@v == 1 ? : |
|
5662
|
0 |
6 |
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;
}
) |
|
5667
|
0 |
6 |
if ($resp->code == 304) { } |
|
5669
|
0 |
0 |
unless defined $arg{'file'} |
|
5672
|
0 |
0 |
unless open my $fh, "<", $arg{'file'} |
|
5678
|
0 |
0 |
if defined $file_time |
|
5684
|
6 |
0 |
if $resp->is_success and defined $arg{'post_process'} |
|
5685
|
1 |
5 |
unless $resp->is_success |
|
5688
|
0 |
5 |
if (defined $arg{'file'}) |
|
5690
|
0 |
0 |
unless open my $fh, ">", $arg{'file'} |
|
5703
|
0 |
2 |
defined $info->{'spacetrack_source'} ? : |
|
|
2 |
3 |
unless defined $arg{'spacetrack_source'} |
|
5708
|
2 |
5 |
defined $info->{$_} ? : |
|
|
8 |
7 |
if (defined $arg{$_}) { } |
|
5725
|
2 |
94 |
unless defined $version |
|
5764
|
0 |
1 |
unless my($id) = / \A ( [\s\d]{5} ) /msx |
|
5765
|
0 |
1 |
unless $id =~ / \A \s* \d+ \z /msx |
|
5772
|
0 |
1 |
if ($opt->{'observing_list'}) { } |
|
5774
|
0 |
0 |
/ \n \z /msx ? : |
|
5784
|
1 |
0 |
if ($resp->is_success) |
|
5786
|
0 |
1 |
unless ($self->{'_pragmata'}) |
|
5795
|
0 |
1 |
wantarray ? : |
|
5803
|
0 |
1 |
unless ref $object |
|
5804
|
0 |
1 |
unless builtin::blessed($object) |
|
5826
|
0 |
0 |
unless $resp->code == 500 |
|
5828
|
0 |
0 |
unless (my $msg = $resp->message) =~ s/ ( [(] certificate\ verify\ failed ) [)]/$1; try setting the verify_hostname attribute false)/msx |
|
5848
|
0 |
22 |
if ($value =~ / \A --? /msx) { } |
|
5855
|
0 |
0 |
if ($_[1]) |
|
5865
|
0 |
22 |
if $value =~ / \A 0 (?: [0-7]+ | x [[:xdigit:]]+ ) \z /msx |
|
5889
|
0 |
0 |
if -e $gpg_file |
|
5899
|
0 |
0 |
if -B $fn |
|
5901
|
0 |
0 |
unless open my $fh, "<:encoding(utf-8)", $fn |
|
5912
|
14 |
0 |
unless defined $value |
|
5913
|
0 |
14 |
if ($value and my $identity = __spacetrack_identity()) |
|
5938
|
0 |
0 |
if $loaded |
|
5942
|
0 |
0 |
unless -f $fn |
|
5946
|
0 |
0 |
unless eval {
do {
require Config::Identity;
$identity = {"Config::Identity"->load($fn)};
1
}
} |
|
5953
|
0 |
0 |
unless exists $identity->{$key} |
|
5956
|
0 |
0 |
if scalar keys %{$identity;} > 2 |
|
5972
|
0 |
0 |
unless exists $spacetrack_interface_info->{$name} |
|
5975
|
0 |
0 |
if $need_logout{$name} |
|
5987
|
0 |
0 |
unless exists $spacetrack_interface_info->{$name} |
|
6006
|
0 |
0 |
unless $catalogs{'iridium_status'}{$_[2]} |
|
6017
|
0 |
0 |
if $_[2] =~ / \D /msx |
|
6029
|
0 |
2 |
unless $value |
|
6032
|
0 |
2 |
unless $value =~ / \A \d+ \z /msx and $self->{'_space_track_interface'}[$value] |
|
6035
|
0 |
2 |
if $value == 1 |
|
6066
|
0 |
3 |
unless my $info = $catalogs{$source} |
|
6069
|
1 |
2 |
if ("ARRAY" eq ref $info) |
|
6071
|
0 |
1 |
unless $info = $info->[$inx] |
|
6081
|
0 |
3 |
$info->{$catalog} ? : |
|
|
3 |
0 |
defined $catalog ? : |
|
6085
|
0 |
3 |
defined $note ? : |
|
6088
|
3 |
0 |
unless $self->{'verbose'} |
|
6113
|
14 |
85 |
unless ("ARRAY" eq ref $lgl_opts) |
|
6117
|
0 |
14 |
unless my $code = $pkg->can("_${caller}_opts") |
|
6122
|
18 |
81 |
if ('HASH' eq ref $args[0]) { } |
|
6126
|
18 |
0 |
unless ($ENV{'SPACETRACK_SKIP_OPTION_HASH_VALIDATION'}) |
|
6130
|
0 |
47 |
unless $lgl{$key} |
|
6137
|
0 |
18 |
if @bad |
|
6151
|
0 |
81 |
unless $go->getoptionsfromarray(\@args, $opt, keys %lgl) |
|
6164
|
0 |
0 |
$arg{'carp'} ? : |
|
6165
|
0 |
0 |
if (defined $arg{'name'}) |
|
6168
|
0 |
0 |
'ARRAY' eq ref $arg{'name'} ? : |
|
6170
|
0 |
0 |
unless @names |
|
6171
|
0 |
0 |
@names > 1 ? : |
|
6175
|
0 |
0 |
if (defined $arg{'legal'}) |
|
6188
|
0 |
0 |
if defined $arg{'suffix'} |
|
6190
|
0 |
0 |
unless $arg{'carp'} |
|
6207
|
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) { } |
|
6220
|
14 |
0 |
$year < 100 ? : |
|
|
0 |
14 |
$year < 57 ? : |
|
6222
|
1 |
13 |
unless $launch |
|
6225
|
4 |
9 |
if $part |
|
6238
|
0 |
14 |
unless my($year, $month, $day) = $date =~ / \A (\d+) (?:\D+ (\d+) (?: \D+ (\d+) )? )? /msx |
|
6241
|
0 |
14 |
$year < 100 ? : |
|
|
0 |
14 |
$year < 57 ? : |
|
6243
|
0 |
14 |
unless defined $month |
|
6246
|
14 |
0 |
if defined $day |
|
6276
|
50 |
32 |
'ARRAY' eq ref $args[0] ? : |
|
6282
|
50 |
32 |
$extra_options ? : |
|
6315
|
0 |
5 |
$opt->{'tle'} ? : |
|
|
5 |
77 |
defined $opt->{'tle'} ? : |
|
|
82 |
9 |
unless defined $table |
|
6319
|
0 |
2 |
if $opt->{'json'} and defined $opt->{'format'} and $opt->{'format'} ne "json" |
|
6321
|
0 |
91 |
unless $format{$table} |
|
6325
|
1 |
69 |
$opt->{'json'} ? : |
|
|
70 |
21 |
unless defined $opt->{'format'} |
|
6327
|
75 |
16 |
unless exists $opt->{'json'} |
|
6329
|
0 |
91 |
unless $format{$table}{'valid'}{$opt->{'format'}} |
|
6330
|
81 |
10 |
$opt->{'format'} eq 'legacy' ? : |
|
6341
|
65 |
0 |
unless defined $sort |
|
6344
|
0 |
0 |
unless $valid{$sort} |
|
6368
|
57 |
5 |
unless $opt->{$key} |
|
6370
|
5 |
0 |
if ($opt->{$key} =~ / \D /msx) |
|
6372
|
0 |
5 |
unless $str =~ / \A
( \d+ ) \D+ ( \d+ ) \D+ ( \d+ )
(?: \D+ ( \d+ ) (?: \D+ ( \d+ ) (?: \D+ ( \d+ ) )? )? )?
\z /msx |
|
6379
|
15 |
15 |
unless defined $_ |
|
6382
|
5 |
0 |
if ($time[5] > 1900) { } |
|
|
0 |
0 |
elsif ($time[5] < 57) { } |
|
6388
|
0 |
5 |
unless eval {
do {
$opt->{$key} = Time::Local::timegm(@time);
1
}
} |
|
6397
|
4 |
27 |
if ($found) |
|
6399
|
3 |
1 |
if ($found == 1) |
|
6404
|
0 |
4 |
unless $opt->{'start_epoch'} <= $opt->{'end_epoch'} |
|
6449
|
50 |
0 |
if (defined $opt->{'status'}) |
|
6451
|
0 |
50 |
unless defined(my $query = $status_query{$opt->{'status'}}) |
|
6453
|
47 |
3 |
if $query |
|
6459
|
12 |
38 |
if ($opt->{'exclude'} and @{$opt->{'exclude'};}) |
|
6462
|
0 |
18 |
unless $include_map{$_} |
|
6468
|
1 |
49 |
if ($opt->{'include'} and @{$opt->{'include'};}) |
|
6470
|
0 |
1 |
unless $include_map{$_} |
|
6478
|
13 |
37 |
if keys %incl |
|
6502
|
0 |
50 |
'ARRAY' eq ref $args[0] ? : |
|
6510
|
0 |
50 |
unless $legal_search_status{$opt->{'status'}} |
|
6519
|
0 |
19 |
unless $include_map{$_} |
|
6527
|
45 |
5 |
unless defined $opt->{'tle'} |
|
6561
|
0 |
86 |
unless "HASH" eq ref $rest_args |
|
6568
|
0 |
172 |
if @rslt |
|
6570
|
0 |
172 |
if defined $rest_args->{$key} |
|
6593
|
0 |
0 |
unless $start |
|
6601
|
0 |
0 |
if (my $code = $app->can("_readline_complete_command_$cmd")) |
|
6605
|
0 |
0 |
if ($text =~ / \A - /msx and my $code = $app->can("_${cmd}_opts")) |
|
6610
|
0 |
0 |
if $catalogs{$cmd} |
|
6614
|
0 |
0 |
if (1 == @files) { } |
|
|
0 |
0 |
elsif ($readline::var_CompleteAddsuffix) { } |
|
6615
|
0 |
0 |
-d $files[0] ? : |
|
6618
|
0 |
0 |
if (-l $_) { } |
|
|
0 |
0 |
elsif (-d $_) { } |
|
|
0 |
0 |
elsif (-x _) { } |
|
|
0 |
0 |
elsif (-S _ or -p _) { } |
|
6636
|
0 |
0 |
if ("ARRAY" eq ref $this_cat) |
|
6637
|
0 |
0 |
unless my $code = $app->can("_${cat}_catalog_version") |
|
6643
|
0 |
0 |
unless defined $text and $text ne "" |
|
6655
|
0 |
0 |
unless (@builtins) |
|
6660
|
0 |
0 |
if $sym =~ / \A _ /msx |
|
6662
|
0 |
0 |
if $sym =~ / [[:upper:]] /msx |
|
6664
|
0 |
0 |
if $disallow{$sym} |
|
6666
|
0 |
0 |
unless $app->can($sym) |
|
6674
|
0 |
0 |
if 1 == @rslt and $rslt[0] =~ / \W \z /msx |
|
6683
|
0 |
0 |
unless $text =~ / \A ( --? ) ( .* ) /msx |
|
6692
|
0 |
0 |
if (my $o = $_) =~ s/ ( [!=?] ) .* //msx |
|
6696
|
0 |
0 |
if $type eq "!" |
|
6725
|
0 |
0 |
unless wantarray |
|
6728
|
0 |
0 |
unless defined $fn |
|
6731
|
0 |
0 |
unless my $fh = "IO::File"->new($fn, "<") |
|
6760
|
0 |
44 |
unless @args |
|
6762
|
44 |
0 |
defined $opt->{'separator'} ? : |
|
6765
|
44 |
0 |
if (defined $range_operator) { } |
|
6767
|
151 |
59 |
if ('ARRAY' eq ref $rslt[-1]) { } |
|
6768
|
147 |
4 |
if ($arg == $rslt[-1][1] + 1) { } |
|
6771
|
4 |
0 |
if $arg > $rslt[-1][1] |
|
6775
|
11 |
48 |
if ($arg == $rslt[-1] + 1) { } |
|
6778
|
48 |
0 |
if $arg > $rslt[-1] |
|
6789
|
10 |
1 |
$_->[1] > $_->[0] + 1 ? : |
|
|
11 |
41 |
if (ref $_) { } |
|
6820
|
0 |
3 |
unless defined $_ |