r56010 - in /trunk/libwww-mechanize-perl: ./ debian/ debian/patches/ debian/source/ lib/WWW/ lib/WWW/Mechanize/ t/
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Mon Apr 12 11:32:55 UTC 2010
Author: ansgar-guest
Date: Mon Apr 12 11:32:46 2010
New Revision: 56010
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56010
Log:
* New upstream release.
* Use source format 3.0 (quilt); drop README.source and quilt framework.
* debian/control: Make build-dep on perl unversioned.
* debian/control: Add build-dependency on libtest-memory-cycle-perl and
libtest-nowarnings-perl to enable additional tests.
* Use tiny debian/rules.
* Update debian/copyright for current DEP-5 proposal.
* Bump Standards-Version to 3.8.4.
* Add myself to Uploaders.
Added:
trunk/libwww-mechanize-perl/debian/patches/spelling.patch
trunk/libwww-mechanize-perl/debian/source/
trunk/libwww-mechanize-perl/debian/source/format
trunk/libwww-mechanize-perl/t/untaint.t
- copied unchanged from r56007, branches/upstream/libwww-mechanize-perl/current/t/untaint.t
Removed:
trunk/libwww-mechanize-perl/debian/README.source
Modified:
trunk/libwww-mechanize-perl/Changes
trunk/libwww-mechanize-perl/MANIFEST
trunk/libwww-mechanize-perl/META.yml
trunk/libwww-mechanize-perl/debian/changelog
trunk/libwww-mechanize-perl/debian/control
trunk/libwww-mechanize-perl/debian/copyright
trunk/libwww-mechanize-perl/debian/patches/adding_pod_see_also.patch
trunk/libwww-mechanize-perl/debian/patches/series
trunk/libwww-mechanize-perl/debian/rules
trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm
trunk/libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod
trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod
Modified: trunk/libwww-mechanize-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/Changes?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/Changes (original)
+++ trunk/libwww-mechanize-perl/Changes Mon Apr 12 11:32:46 2010
@@ -7,6 +7,28 @@
Mech now has its own mailing list at Google Groups:
http://groups.google.com/group/www-mechanize-users
+
+NEXT Sat Apr 10 23:10:07 CDT 2010
+========================================
+[FIXED]
+Fixed a declaration in the Movable Type example in
+WWW::Mechanize::Examples.
+
+Quiet warnings if %ENV has undef values.
+
+$mech->follow_link() no longer dies with an inappropriate error if
+the link is not found.
+
+$mech->click_button() now checks to see if a form is selected.
+
+[INCOMPATIBILITIES]
+$mech->form_name() and $mech->form_number() no longer throw warnings
+if they can't find the form specified. They still return undef,
+though.
+
+[DOCUMENTATION]
+More additions to the FAQ.
+
1.60 Mon Aug 17 00:41:39 CDT 2009
========================================
Modified: trunk/libwww-mechanize-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/MANIFEST?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/MANIFEST (original)
+++ trunk/libwww-mechanize-perl/MANIFEST Mon Apr 12 11:32:46 2010
@@ -60,6 +60,7 @@
t/taint.t
t/tick.html
t/tick.t
+t/untaint.t
t/upload.html
t/upload.t
t/warn.t
Modified: trunk/libwww-mechanize-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/META.yml?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/META.yml (original)
+++ trunk/libwww-mechanize-perl/META.yml Mon Apr 12 11:32:46 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: WWW-Mechanize
-version: 1.60
+version: 1.62
abstract: Handy web browsing in a Perl object
author:
- Andy Lester <andy at petdance.com>
@@ -43,7 +43,7 @@
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.52
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/libwww-mechanize-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/changelog?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/changelog (original)
+++ trunk/libwww-mechanize-perl/debian/changelog Mon Apr 12 11:32:46 2010
@@ -1,15 +1,20 @@
-libwww-mechanize-perl (1.60-1) UNRELEASED; urgency=low
-
- [ Jonathan Yu ]
- No release necessary
- IGNORE-VERSION: 1.60-1
-
- * New upstream release
+libwww-mechanize-perl (1.62-1) unstable; urgency=low
[ Ryan Niebur ]
* Update ryan52's email address
- -- Ryan Niebur <ryan at debian.org> Fri, 25 Sep 2009 00:26:59 -0700
+ [ Ansgar Burchardt ]
+ * New upstream release.
+ * Use source format 3.0 (quilt); drop README.source and quilt framework.
+ * debian/control: Make build-dep on perl unversioned.
+ * debian/control: Add build-dependency on libtest-memory-cycle-perl and
+ libtest-nowarnings-perl to enable additional tests.
+ * Use tiny debian/rules.
+ * Update debian/copyright for current DEP-5 proposal.
+ * Bump Standards-Version to 3.8.4.
+ * Add myself to Uploaders.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Mon, 12 Apr 2010 20:32:12 +0900
libwww-mechanize-perl (1.58-1) unstable; urgency=low
Modified: trunk/libwww-mechanize-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/control?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/control (original)
+++ trunk/libwww-mechanize-perl/debian/control Mon Apr 12 11:32:46 2010
@@ -5,13 +5,14 @@
Uploaders: Jay Bonci <jaybonci at debian.org>,
Jaldhar H. Vyas <jaldhar at debian.org>, Rene Mayorga <rmayorga at debian.org.sv>,
Kees Cook <kees at debian.org>, gregor herrmann <gregoa at debian.org>,
- Ryan Niebur <ryan at debian.org>
-Build-Depends: debhelper (>= 7), quilt
-Build-Depends-Indep: perl (>=5.8.0), libwww-perl (>= 5.829),
+ Ryan Niebur <ryan at debian.org>, Ansgar Burchardt <ansgar at 43-1.org>
+Build-Depends: debhelper (>= 7.0.50~)
+Build-Depends-Indep: perl, libwww-perl (>= 5.829),
libhtml-parser-perl, liburi-perl (>= 1.36), libtest-pod-perl, libio-socket-ssl-perl,
netbase, libtest-exception-perl, libtest-warn-perl (>= 0.11), libtest-taint-perl,
- libhttp-server-simple-perl (>= 0.35), libtest-pod-coverage-perl
-Standards-Version: 3.8.2
+ libhttp-server-simple-perl (>= 0.35), libtest-pod-coverage-perl,
+ libtest-memory-cycle-perl, libtest-nowarnings-perl
+Standards-Version: 3.8.4
Homepage: http://search.cpan.org/dist/WWW-Mechanize/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libwww-mechanize-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libwww-mechanize-perl/
@@ -19,7 +20,7 @@
Package: libwww-mechanize-perl
Architecture: all
Recommends: libio-socket-ssl-perl
-Depends: perl (>= 5.8.0), ${perl:Depends}, ${misc:Depends},
+Depends: ${perl:Depends}, ${misc:Depends},
libwww-perl (>= 5.829), libhtml-parser-perl,
liburi-perl (>= 1.36), libhttp-server-simple-perl (>= 0.35)
Description: module to automate interaction with websites
Modified: trunk/libwww-mechanize-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/copyright?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/copyright (original)
+++ trunk/libwww-mechanize-perl/debian/copyright Mon Apr 12 11:32:46 2010
@@ -1,18 +1,14 @@
-Format-Specification:
- http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Andy Lester <andy at petdance.com>.
-Upstream-Source: http://search.cpan.org/dist/WWW-Mechanize
-Upstream-Name: WWWW-Mechanize
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Andy Lester <andy at petdance.com>.
+Source: http://search.cpan.org/dist/WWW-Mechanize
+Name: WWWW-Mechanize
-Files: *
Copyright: 2004-2009 Andy Lester. All rights reserved.
-License-Alias: Perl
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
Files: t/local/LocalServer.pm
Copyright: 2003 Max Maischein <corion at cpan.org>
-License-Alias: Perl
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
Files: debian/*
Copyright:
@@ -20,7 +16,7 @@
2007-2008 Rene Mayorga <rmayorga at debian.org.sv>
2008 Kees Cook <kees at debian.org>
2007-2009 gregor herrmann <gregoa at debian.org>
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
Modified: trunk/libwww-mechanize-perl/debian/patches/adding_pod_see_also.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/patches/adding_pod_see_also.patch?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/patches/adding_pod_see_also.patch (original)
+++ trunk/libwww-mechanize-perl/debian/patches/adding_pod_see_also.patch Mon Apr 12 11:32:46 2010
@@ -1,8 +1,10 @@
-Add manpage "SEE ALSO" sections for better documentation.
+Subject: Add manpage "SEE ALSO" sections for better documentation.
+Forwarded: http://code.google.com/p/www-mechanize/issues/detail?id=160
+
--- libwww-mechanize-perl.orig/bin/mech-dump
+++ libwww-mechanize-perl/bin/mech-dump
-@@ -114,3 +114,7 @@
- $mech->dump_forms( undef, $absolute );
+@@ -124,3 +124,7 @@
+ $mech->dump_images( undef, $absolute );
return;
}
+
Modified: trunk/libwww-mechanize-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/patches/series?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/patches/series (original)
+++ trunk/libwww-mechanize-perl/debian/patches/series Mon Apr 12 11:32:46 2010
@@ -1,2 +1,3 @@
no_internet.patch
adding_pod_see_also.patch
+spelling.patch
Added: trunk/libwww-mechanize-perl/debian/patches/spelling.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/patches/spelling.patch?rev=56010&op=file
==============================================================================
--- trunk/libwww-mechanize-perl/debian/patches/spelling.patch (added)
+++ trunk/libwww-mechanize-perl/debian/patches/spelling.patch Mon Apr 12 11:32:46 2010
@@ -1,0 +1,17 @@
+From: Ansgar Burchardt <ansgar at 43-1.org>
+Date: Mon, 12 Apr 2010 20:21:08 +0900
+Origin: vendor
+Subject: Fix spelling error
+Forwarded: http://code.google.com/p/www-mechanize/issues/detail?id=159
+
+--- libwww-mechanize-perl.orig/lib/WWW/Mechanize/Examples.pod
++++ libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod
+@@ -492,7 +492,7 @@
+ use strict;
+ use WWW::Mechanize;
+
+- # a tool to automatically post entries to a moveable type weblog, and set arbitary creation dates
++ # a tool to automatically post entries to a moveable type weblog, and set arbitrary creation dates
+
+ my $mech = WWW::Mechanize->new();
+ my $entry;
Modified: trunk/libwww-mechanize-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/rules?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/rules (original)
+++ trunk/libwww-mechanize-perl/debian/rules Mon Apr 12 11:32:46 2010
@@ -1,27 +1,6 @@
#!/usr/bin/make -f
-
-include /usr/share/quilt/quilt.make
-
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
- dh build --before test
- http_proxy= HTTP_PROXY= NOINTERNET=1 $(MAKE) test
- dh build --after test
- touch $@
-
-clean: unpatch
+%:
dh $@
-install: install-stamp
-install-stamp: build-stamp
- dh install
- touch $@
-
-binary-arch:
-
-binary-indep: install
- dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
+override_dh_auto_test:
+ http_proxy= HTTP_PROXY= NOINTERNET=1 dh_auto_test
Added: trunk/libwww-mechanize-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/source/format?rev=56010&op=file
==============================================================================
--- trunk/libwww-mechanize-perl/debian/source/format (added)
+++ trunk/libwww-mechanize-perl/debian/source/format Mon Apr 12 11:32:46 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)
Modified: trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm (original)
+++ trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm Mon Apr 12 11:32:46 2010
@@ -6,20 +6,46 @@
=head1 VERSION
-Version 1.60
-
-=cut
-
-our $VERSION = '1.60';
+Version 1.62
+
+=cut
+
+our $VERSION = '1.62';
=head1 SYNOPSIS
-C<WWW::Mechanize>, or Mech for short, helps you automate interaction with
-a website. It supports performing a sequence of page fetches including
-following links and submitting forms. Each fetched page is parsed and
-its links and forms are extracted. A link or a form can be selected, form
-fields can be filled and the next page can be fetched. Mech also stores
-a history of the URLs you've visited, which can be queried and revisited.
+C<WWW::Mechanize>, or Mech for short, is a Perl module for stateful
+programmatic web browsing, used for automating interaction with
+websites.
+
+Features include:
+
+=over 4
+
+=item * All HTTP methods
+
+=item * High-level hyperlink and HTML form support, without having to parse HTML yourself
+
+=item * SSL support
+
+=item * Automatic cookies
+
+=item * Custom HTTP headers
+
+=item * Automatic handling of redirections
+
+=item * Proxies
+
+=item * HTTP authentication
+
+=back
+
+Mech supports performing a sequence of page fetches including
+following links and submitting forms. Each fetched page is parsed
+and its links and forms are extracted. A link or a form can be
+selected, form fields can be filled and the next page can be fetched.
+Mech also stores a history of the URLs you've visited, which can
+be queried and revisited.
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
@@ -709,8 +735,14 @@
}
my $link = $self->find_link(%parms);
- return $self->get( $link->url ) if $link;
- $self->die( 'Link not found: ', $link->url ) if $self->{autocheck};
+ if ( $link ) {
+ return $self->get( $link->url );
+ }
+
+ if ( $self->{autocheck} ) {
+ $self->die( 'Link not found' );
+ }
+
return;
}
@@ -1209,10 +1241,8 @@
$self->{form} = $self->{forms}->[$form-1];
return $self->{form};
}
- else {
- $self->warn( "There is no form numbered $form" );
- return undef;
- }
+
+ return;
}
=head2 $mech->form_name( $name )
@@ -1239,10 +1269,8 @@
if $nmatches > 1;
return $self->{form} = $matches[0];
}
- else {
- $self->warn( qq{ There is no form named "$form"} );
- return undef;
- }
+
+ return;
}
=head2 $mech->form_id( $name )
@@ -1362,6 +1390,11 @@
an C<n> key selects an item by number (e.g.
C<< {n => 3} >> or C<< {n => [2,4]} >>).
The numbering starts at 1. This applies to the current form.
+
+If you have a field with C<< <select multiple> >> and you pass a single
+C<$value>, then C<$value> will be added to the list of fields selected,
+without clearing the others. However, if you pass an array reference,
+then all previously selected values will be cleared.
Returns true on successfully setting the value. On failure, returns
false and calls C<< $self>warn() >> with an error message.
@@ -1699,7 +1732,8 @@
$_ = 1 unless defined;
}
- my $form = $self->{form};
+ my $form = $self->{form} or $self->die( 'click_button: No form has been selected' );
+
my $request;
if ( $args{name} ) {
$request = $form->click( $args{name}, $args{x}, $args{y} );
@@ -2332,7 +2366,7 @@
return $_taintbrush if _is_tainted( $_taintbrush );
# Let's try again. Maybe somebody cleaned those.
- $_taintbrush = substr(join("", @ARGV, %ENV), 0, 0);
+ $_taintbrush = substr(join('', grep { defined } @ARGV, %ENV), 0, 0);
return $_taintbrush if _is_tainted( $_taintbrush );
# If those don't work, go try to open some file from some unsafe
@@ -2869,7 +2903,7 @@
=head1 COPYRIGHT
-Copyright (c) 2005-2009 Andy Lester. All rights reserved. This program is
+Copyright (c) 2005-2010 Andy Lester. All rights reserved. This program is
free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
Modified: trunk/libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod (original)
+++ trunk/libwww-mechanize-perl/lib/WWW/Mechanize/Examples.pod Mon Apr 12 11:32:46 2010
@@ -489,12 +489,13 @@
=head2 Hacking Movable Type, by Dan Rinzel
+ use strict;
use WWW::Mechanize;
# a tool to automatically post entries to a moveable type weblog, and set arbitary creation dates
my $mech = WWW::Mechanize->new();
- my %entry;
+ my $entry;
$entry->{title} = "Test AutoEntry Title";
$entry->{btext} = "Test AutoEntry Body";
$entry->{date} = '2002-04-15 14:18:00';
Modified: trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod?rev=56010&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod (original)
+++ trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod Mon Apr 12 11:32:46 2010
@@ -233,6 +233,51 @@
#Access the form using its Zero-Based Index by DOM order
$mech->form_name('trgForm')->action('http://newAction'); #ABS URL
+=head2 How do I save an image? How do I save a large tarball?
+
+An image is just content. You get the image and save it.
+
+ $mech->get( 'photo.jpg' );
+ $mech->save_content( '/path/to/my/directory/photo.jpg' );
+
+You can also save any content directly to disk using the C<:content_file>
+flag to C<get()>, which is part of L<LWP::UserAgent>.
+
+ $mech->get( 'http://www.cpan.org/src/stable.tar.gz',
+ ':content_file' => 'stable.tar.gz' );
+
+=head2 How do I pick a specific value from a C<< <select> >> list?
+
+Find the C<HTML::Form::ListInput> in the page.
+
+ my ($listbox) = $mech->find_all_inputs( name => 'listbox' );
+
+Then create a hash for the lookup:
+
+ my %name_lookup;
+ @name_lookup{ $listbox->value_names } = $listbox->possible_values;
+ my $value = $name_lookup{ 'Name I want' };
+
+If you have duplicate names, this method won't work, and you'll
+have to loop over C<< $listbox->value_names >> and
+C<< $listbox->possible_values >> in parallel until you find a
+matching name.
+
+=head2 How do I get Mech to not follow redirects?
+
+You use functionality in LWP::UserAgent, not Mech itself.
+
+ $mech->requests_redirectable( [] );
+
+Or you can set C<max_redirect>:
+
+ $mech->max_redirect( 0 );
+
+Both these options can also be set in the constructor. Mech doesn't
+understand them, so will pass them through to the LWP::UserAgent
+constructor.
+
+
=head1 Why doesn't this work: Debugging your Mechanize program
=head2 My Mech program doesn't work, but it works in the browser.
More information about the Pkg-perl-cvs-commits
mailing list