diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-03-06 14:38:59 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-03-06 14:38:59 +0200 |
commit | 417659b757afc85fc437f3da462c09a4b86c1282 (patch) | |
tree | 5430de4b239bbcd71247407f44e3279d5390f2e1 /examples/lib/LWP/Ping903.pm | |
parent | 9358876eb9b42408cef571052c6e997aa77f0c77 (diff) | |
download | ping903-417659b757afc85fc437f3da462c09a4b86c1282.tar.gz ping903-417659b757afc85fc437f3da462c09a4b86c1282.tar.bz2 |
Version 0.5v0.5
* NEWS: Update.
* configure.ac: Raise version number.
* examples/lib/LWP/Ping903.pm: Remove.
* examples/README: Mention Mangemanche. Remove references to
lib/LWP/Ping903.pm
* examples/dbload: Revert to LWP::UserAgent
* examples/inspect: Likewise.
* examples/ipadd: Likewise.
* examples/ipdel: Likewise.
Diffstat (limited to 'examples/lib/LWP/Ping903.pm')
-rw-r--r-- | examples/lib/LWP/Ping903.pm | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/examples/lib/LWP/Ping903.pm b/examples/lib/LWP/Ping903.pm deleted file mode 100644 index 8fc398e..0000000 --- a/examples/lib/LWP/Ping903.pm +++ /dev/null @@ -1,49 +0,0 @@ -package LWP::Ping903; -use parent 'LWP::UserAgent'; -use File::Spec; -use HTTP::Status qw(:constants); -use strict; -use warnings; -use Carp; - -my $VERSION = '0.3'; - -sub new { - my $class = shift; - my $self = bless $class->SUPER::new(@_), $class; - $self->agent("$class/$VERSION"); - return $self; -} - -sub get_basic_credentials { - my ($self, $realm, $uri, $isproxy) = @_; - my $cf = File::Spec->catfile($ENV{HOME}, ".ping903.cred"); - if (open(my $fh, '<', $cf)) { - while (<$fh>) { - chomp; - s/^\s+//; - s/\s+$//; - next if /^(#.*)?$/; - my @words; - while ($_) { - no warnings 'uninitialized'; - if (s/^"(.*?)(?<!\\)"(?:\s+(.*))?$/$2/) { - (my $s = $1) =~ s/\\([\\\"])/$1/g; - push @words, $s; - } else { - s/^(.+?)(?:\s+(.+))?$/$2/; - push @words, $1; - } - } - if (@words == 4) { - my($h,$p) = split /:/, $words[0], 2; - if (($h eq '*' || $h eq $uri->host) - && (!$p || $p eq '*' || $p eq $uri->port) - && ($words[1] eq $realm || $words[1] eq '*')) { - return @words[2..3]; - } - } - } - } - return (); -} |