Commit e8f93954 authored by Ansgar's avatar Ansgar

* Team upload.

* New upstream release.
* No longer run author tests.
* Use minimal debian/rules with debhelper 8.
* Use source format 3.0 (quilt).
* debian/copyright: Update for new release; refer to "Debian systems" instead
  of "Debian GNU/Linux systems"; refer to /usr/share/common-licenses/GPL-1.
* Bump Standards-Version to 3.9.2.
parents b566b70e c9ccebd4
Release history for Perl module LWP::Online
1.08 Fri 9 Jul 2011
- Updated to Module::Install::DSL 1.01
- Added the Microsoft NCSI URL to the list of sites probed
1.07 Mon 7 Jul 2008
- More diag in 01_compile.t to catch what I think is a CPAN
Testers with broken setups.
......
......@@ -2,6 +2,7 @@ Changes
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/DSL.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
......@@ -16,6 +17,6 @@ README
t/01_compile.t
t/02_main.t
t/03_skip_all.t
t/97_meta.t
t/98_pod.t
t/99_pmv.t
xt/meta.t
xt/pmv.t
xt/pod.t
......@@ -3,9 +3,12 @@ abstract: 'Does your process have access to the web'
author:
- 'Adam Kennedy <adamk@cpan.org>'
build_requires:
ExtUtils::MakeMaker: 6.42
Test::More: 0.42
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
generated_by: 'Module::Install version 0.76'
generated_by: 'Module::Install version 1.01'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -16,10 +19,13 @@ no_index:
directory:
- inc
- t
- xt
requires:
LWP::Simple: 0
URI: 0
LWP::Simple: 5.805
URI: 1.35
perl: 5.005
resources:
ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/LWP-Online
license: http://dev.perl.org/licenses/
version: 1.07
repository: http://svn.ali.as/cpan/trunk/LWP-Online
version: 1.08
use inc::Module::Install 0.76;
use inc::Module::Install::DSL 1.01;
all_from 'lib/LWP/Online.pm';
requires 'URI' => 0;
requires 'LWP::Simple' => 0;
test_requires 'Test::More' => '0.42';
WriteAll;
all_from lib/LWP/Online.pm
requires_from lib/LWP/Online.pm
test_requires Test::More 0.42
......@@ -3,19 +3,20 @@ NAME
SYNOPSIS
use LWP::Online 'online';
# "Is the internet working?"
# "Is the internet working?"
die "NO INTARWWEB!!!" unless online();
# The above means something like this
# The above means something like this
unless ( online('http') ) {
die "No basic http access to the web";
}
# Special syntax for use in test scripts that need
# Special syntax for use in test scripts that need
# "real" access to the internet. Scripts will automatically
# skip if connection fails.
use LWP::Online ':skip_all';
use Test::More tests => 4; #after LWP::Online
DESCRIPTION
This module attempts to answer, as accurately as it can, one of the
......@@ -111,8 +112,8 @@ FUNCTIONS
online
# Default check (uses http)
online() or die "No Internet";
# The above is equivalent to
# The above is equivalent to
online('http') or die "No Internet";
The importable online function is the main functionality provided by
......@@ -182,7 +183,7 @@ SEE ALSO
LWP::Simple
COPYRIGHT
Copyright 2006 - 2008 Adam Kennedy.
Copyright 2006 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
......
liblwp-online-perl (1.07-2) UNRELEASED; urgency=low
liblwp-online-perl (1.08-1) unstable; urgency=low
* Team upload.
[ gregor herrmann ]
* debian/control: add missing full stop to long description, thanks to
......@@ -12,11 +14,16 @@ liblwp-online-perl (1.07-2) UNRELEASED; urgency=low
perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
permitted by Debian Policy 3.8.3).
[ gregor herrmann ]
* debian/control: add perl (>= 5.10.1) as an alternative build dependency
for Pod::Simple.
[ Ansgar Burchardt ]
* New upstream release.
* No longer run author tests.
* Use minimal debian/rules with debhelper 8.
* Use source format 3.0 (quilt).
* debian/copyright: Update for new release; refer to "Debian systems" instead
of "Debian GNU/Linux systems"; refer to /usr/share/common-licenses/GPL-1.
* Bump Standards-Version to 3.9.2.
-- gregor herrmann <gregoa@debian.org> Fri, 20 Mar 2009 15:11:25 +0100
-- Ansgar Burchardt <ansgar@debian.org> Sat, 09 Jul 2011 11:26:20 +0200
liblwp-online-perl (1.07-1) unstable; urgency=low
......
Source: liblwp-online-perl
Section: perl
Priority: optional
Build-Depends: debhelper (>= 7)
Build-Depends-Indep: perl,
liburi-perl,
libwww-perl,
libtest-cpan-meta-perl,
perl (>= 5.10.1) | libpod-simple-perl (>= 3.06),
libtest-pod-perl,
libtest-minimumversion-perl
Build-Depends: debhelper (>= 8)
Build-Depends-Indep: perl, liburi-perl, libwww-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Uploaders: Antonio Radici <antonio@dyne.org>
Standards-Version: 3.8.0
Standards-Version: 3.9.2
Homepage: http://search.cpan.org/dist/LWP-Online/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/liblwp-online-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/liblwp-online-perl/
......
Format-Specification:
http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
Upstream-Maintainer: Adam Kennedy <adamk@cpan.org>
Upstream-Source: http://search.cpan.org/dist/LWP-Online/
Upstream-Name: LWP-Online
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Maintainer: Adam Kennedy <adamk@cpan.org>
Source: http://search.cpan.org/dist/LWP-Online/
Name: LWP-Online
Files: *
Copyright: 2006-2008, Adam Kennedy <adamk@cpan.org>
License-Alias: Perl
license: Artistic | GPL-1+
Copyright: 2006-2011, Adam Kennedy <adamk@cpan.org>
License: Artistic or GPL-1+
Files: inc/*
Copyright: 2002-2009, Adam Kennedy <adamk@cpan.org>
Audrey Tang <autrijus@autrijus.org>
Brian Ingerson <ingy@cpan.org>
license: Artistic | GPL-1+
Copyright:
2002-2011, Adam Kennedy <adamk@cpan.org>
2002-2011, Audrey Tang <autrijus@autrijus.org>
2002-2011, Brian Ingerson <ingy@cpan.org>
license: Artistic or GPL-1+
Files: debian/*
Copyright: 2009, Antonio Radici <antonio@dyne.org>
License: Artistic | GPL-1+
License: Artistic or GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
On Debian GNU/Linux systems, the complete text of the Artistic License
can be found in `/usr/share/common-licenses/Artistic'
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
On Debian systems, the complete text of the Artistic License can be
found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
On Debian systems, the complete text of version 1 of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-1'.
#!/usr/bin/make -f
build: build-stamp
build-stamp:
http_proxy= HTTP_PROXY= CGI_HTTP_PROXY= AUTOMATED_TESTING=1 dh build
touch $@
clean:
%:
dh $@
install: install-stamp
install-stamp: build-stamp
dh install
override_dh_auto_test:
http_proxy= HTTP_PROXY= CGI_HTTP_PROXY= dh_auto_test
touch $@
binary-arch:
binary-indep: install
dh $@
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep install clean build
abort-on-upstream-changes
unapply-patches
This diff is collapsed.
#line 1
package Module::Install::Base;
$VERSION = '0.76';
# Suspend handler for "redefined" warnings
BEGIN {
my $w = $SIG{__WARN__};
$SIG{__WARN__} = sub { $w };
}
### This is the ONLY module that shouldn't have strict on
# use strict;
#line 41
sub new {
my ($class, %args) = @_;
foreach my $method ( qw(call load) ) {
*{"$class\::$method"} = sub {
shift()->_top->$method(@_);
} unless defined &{"$class\::$method"};
}
bless( \%args, $class );
}
package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
$VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
BEGIN {
my $w = $SIG{__WARN__};
$SIG{__WARN__} = sub { $w };
}
#line 42
sub new {
my $class = shift;
unless ( defined &{"${class}::call"} ) {
*{"${class}::call"} = sub { shift->_top->call(@_) };
}
unless ( defined &{"${class}::load"} ) {
*{"${class}::load"} = sub { shift->_top->load(@_) };
}
bless { @_ }, $class;
}
#line 61
sub AUTOLOAD {
my $self = shift;
local $@;
my $autoload = eval { $self->_top->autoload } or return;
goto &$autoload;
}
#line 76
sub _top { $_[0]->{_top} }
#line 89
sub admin {
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
}
#line 101
sub is_admin {
$_[0]->admin->VERSION;
}
sub DESTROY {}
package Module::Install::Base::FakeAdmin;
my $Fake;
sub new { $Fake ||= bless(\@_, $_[0]) }
sub AUTOLOAD {}
sub DESTROY {}
# Restore warning handler
BEGIN {
$SIG{__WARN__} = $SIG{__WARN__}->();
}
1;
#line 146
sub AUTOLOAD {
local $@;
my $func = eval { shift->_top->autoload } or return;
goto &$func;
}
#line 75
sub _top {
$_[0]->{_top};
}
#line 90
sub admin {
$_[0]->_top->{admin}
or
Module::Install::Base::FakeAdmin->new;
}
#line 106
sub is_admin {
! $_[0]->admin->isa('Module::Install::Base::FakeAdmin');
}
sub DESTROY {}
package Module::Install::Base::FakeAdmin;
use vars qw{$VERSION};
BEGIN {
$VERSION = $Module::Install::Base::VERSION;
}
my $fake;
sub new {
$fake ||= bless(\@_, $_[0]);
}
sub AUTOLOAD {}
sub DESTROY {}
# Restore warning handler
BEGIN {
$SIG{__WARN__} = $SIG{__WARN__}->();
}
1;
#line 159
#line 1
package Module::Install::Can;
use strict;
use Module::Install::Base;
use Config ();
### This adds a 5.005 Perl version dependency.
### This is a bug and will be fixed.
use File::Spec ();
use ExtUtils::MakeMaker ();
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
$VERSION = '0.76';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
# check if we can load some module
### Upgrade this to not have to load the module if possible
sub can_use {
my ($self, $mod, $ver) = @_;
$mod =~ s{::|\\}{/}g;
$mod .= '.pm' unless $mod =~ /\.pm$/i;
my $pkg = $mod;
$pkg =~ s{/}{::}g;
$pkg =~ s{\.pm$}{}i;
local $@;
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
# check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
my $_cmd = $cmd;
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
my $abs = File::Spec->catfile($dir, $_[1]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
# can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
# $Config{cc} may contain args; try to find out the program part
while (@chunks) {
return $self->can_run("@chunks") || (pop(@chunks), next);
}
return;
}
# Fix Cygwin bug on maybe_command();
if ( $^O eq 'cygwin' ) {
require ExtUtils::MM_Cygwin;
require ExtUtils::MM_Win32;
if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
1;
__END__
#line 157
package Module::Install::Can;
use strict;
use Config ();
use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
# check if we can load some module
### Upgrade this to not have to load the module if possible
sub can_use {
my ($self, $mod, $ver) = @_;
$mod =~ s{::|\\}{/}g;
$mod .= '.pm' unless $mod =~ /\.pm$/i;
my $pkg = $mod;
$pkg =~ s{/}{::}g;
$pkg =~ s{\.pm$}{}i;
local $@;
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
# check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
my $_cmd = $cmd;
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
my $abs = File::Spec->catfile($dir, $_[1]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
# can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
# $Config{cc} may contain args; try to find out the program part
while (@chunks) {
return $self->can_run("@chunks") || (pop(@chunks), next);
}
return;
}
# Fix Cygwin bug on maybe_command();
if ( $^O eq 'cygwin' ) {
require ExtUtils::MM_Cygwin;
require ExtUtils::MM_Win32;
if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
1;
__END__
#line 156
#line 1
package Module::Install::DSL;
use strict;
use vars qw{$VERSION $ISCORE};
BEGIN {
$VERSION = '1.01';
$ISCORE = 1;
*inc::Module::Install::DSL::VERSION = *VERSION;
@inc::Module::Install::DSL::ISA = __PACKAGE__;
}
sub import {
# Read in the rest of the Makefile.PL
open 0 or die "Couldn't open $0: $!";
my $dsl;
SCOPE: {
local $/ = undef;
$dsl = join "", <0>;
}
# Change inc::Module::Install::DSL to the regular one.
# Remove anything before the use inc::... line.
$dsl =~ s/.*?^\s*use\s+(?:inc::)?Module::Install::DSL(\b[^;]*);\s*\n//sm;
# Load inc::Module::Install as we would in a regular Makefile.Pl
SCOPE: {
package main;
require inc::Module::Install;
inc::Module::Install->import;
}
# Add the ::DSL plugin to the list of packages in /inc
my $admin = $Module::Install::MAIN->{admin};
if ( $admin ) {
my $from = $INC{"$admin->{path}/DSL.pm"};
my $to = "$admin->{base}/$admin->{prefix}/$admin->{path}/DSL.pm";
$admin->copy( $from => $to );
}
# Convert the basic syntax to code
my $code = "INIT {\n"
. "package main;\n\n"
. dsl2code($dsl)
. "\n\nWriteAll();\n"
. "}\n";
# Execute the script
eval $code;
print STDERR "Failed to execute the generated code...\n$@" if $@;
exit(0);
}
sub dsl2code {
my $dsl = shift;
# Split into lines and strip blanks
my @lines = grep { /\S/ } split /[\012\015]+/, $dsl;
# Each line represents one command
my @code = ();
foreach my $line ( @lines ) {
# Split the lines into tokens
my @tokens = split /\s+/, $line;
# The first word is the command
my $command = shift @tokens;
my @params = ();
my @suffix = ();
while ( @tokens ) {
my $token = shift @tokens;
if ( $token eq 'if' or $token eq 'unless' ) {
# This is the beginning of a suffix
push @suffix, $token;
push @suffix, @tokens;
last;
} else {
# Convert to a string
$token =~ s/([\\\'])/\\$1/g;
push @params, "'$token'";
}
};
# Merge to create the final line of code
@tokens = ( $command, @params ? join( ', ', @params ) : (), @suffix );
push @code, join( ' ', @tokens ) . ";\n";
}
# Join into the complete code block
return join( '', @code );
}
1;
#line 1
package Module::Install::Fetch;
use strict;
use Module::Install::Base;
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
$VERSION = '0.76';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub get_file {
my ($self, %args) = @_;
my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
$|++;
print "Fetching '$file' from $host... ";
unless (eval { require Socket; Socket::inet_aton($host) }) {
warn "'$host' resolve failed!\n";
return;
}
return unless $scheme eq 'ftp' or $scheme eq 'http';
require Cwd;
my $dir = Cwd::getcwd();
chdir $args{local_dir} or return if exists $args{local_dir};
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
} }
elsif (my $ftp = $self->can_run('ftp')) { eval {
# no Net::FTP, fallback to ftp.exe
require FileHandle;
my $fh = FileHandle->new;
local $SIG{CHLD} = 'IGNORE';
unless ($fh->open("|$ftp -n")) {
warn "Couldn't open ftp: $!\n";
chdir $dir; return;
}
my @dialog = split(/\n/, <<"END_FTP");
open $host