r26303 - in /trunk/libwww-mechanize-perl: ./ debian/ debian/patches/ lib/WWW/ lib/WWW/Mechanize/ t/ t/live/ t/local/

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Tue Oct 28 18:36:26 UTC 2008


Author: rmayorga-guest
Date: Tue Oct 28 18:36:22 2008
New Revision: 26303

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26303
Log:
TODO : Needs HTTP::Response::Encoding 
 
* New upstream release
* debian/control
  + set debhelper and compat version to 7
  + set standards-version to 3.8.0
  + add libtest-taint-perl to B-D-I
* debian/rules 
  + refresh using dh-make-perl template
  + re-add NOINTERNET var before test
* debian/patches - refresh patches
* debian/copyright - convert to the (new)format

Added:
    trunk/libwww-mechanize-perl/t/live/encoding.t
      - copied unchanged from r26300, branches/upstream/libwww-mechanize-perl/current/t/live/encoding.t
Modified:
    trunk/libwww-mechanize-perl/Changes
    trunk/libwww-mechanize-perl/MANIFEST
    trunk/libwww-mechanize-perl/META.yml
    trunk/libwww-mechanize-perl/Makefile.PL
    trunk/libwww-mechanize-perl/debian/changelog
    trunk/libwww-mechanize-perl/debian/compat
    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/no_internet.patch
    trunk/libwww-mechanize-perl/debian/rules
    trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm
    trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod
    trunk/libwww-mechanize-perl/t/autocheck.t
    trunk/libwww-mechanize-perl/t/find_link_id.t
    trunk/libwww-mechanize-perl/t/live/computers4sure.t
    trunk/libwww-mechanize-perl/t/local/back.t
    trunk/libwww-mechanize-perl/t/local/failure.t
    trunk/libwww-mechanize-perl/t/local/follow.t
    trunk/libwww-mechanize-perl/t/local/get.t
    trunk/libwww-mechanize-perl/t/local/log-server

Modified: trunk/libwww-mechanize-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/Changes?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/Changes (original)
+++ trunk/libwww-mechanize-perl/Changes Tue Oct 28 18:36:22 2008
@@ -7,6 +7,49 @@
 
 Mech now has its own mailing list at Google Groups:
 http://groups.google.com/group/www-mechanize-users
+
+1.50        Sun Sun Oct 26 22:42:46 CDT 2008
+========================================
+[THINGS THAT MAY BREAK YOUR CODE]
+WWW::Mechanize now requires version 5.815 of LWP.  This in itself
+may cause problems for you because of changes in how LWP does
+authentication.
+
+
+1.49_01     Sat Sep 27 23:50:04 CDT 2008
+========================================
+[THINGS THAT MAY BREAK YOUR CODE]
+The autocheck argument to the constructor is now ON by default,
+unless WWW::Mechanize is being subclassed.  There are so many new
+programmers whose ->get() calls fail unchecked that I'm now putting
+on the seat belts for them.
+
+[FIXES]
+I do believe we are on the way to having all the encoding problems
+ironed out.  This version incorporates a patch from here:
+
+    http://code.google.com/p/www-mechanize/issues/detail?id=61
+
+and tests from Miyagawa's WWW::Mechanize::DecodedContent
+
+    http://search.cpan.org/dist/WWW-Mechanize-DecodedContent/
+
+to finally fix this.
+
+[ENHANCEMENTS]
+You can now specify not to set up the proxy, if there is one.  The
+proxy causes problems for Crypt::SSLeay.  For details see:
+http://code.google.com/p/www-mechanize/issues/detail?id=39
+
+[DOCUMENTATION]
+Fixed internal links.
+
+[INTERNALS]
+Lots of refactoring based on Schwern's "Skimmable Code" talk.
+
+http://use.perl.org/~schwern/journal/36704
+http://schwern.org/~schwern/talks/Skimmable%20Code%20-%20YAPC-NA-2008.pdf
+
 
 1.34        Mon Dec 10 00:30:39 CST 2007
 ========================================

Modified: trunk/libwww-mechanize-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/MANIFEST?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/MANIFEST (original)
+++ trunk/libwww-mechanize-perl/MANIFEST Tue Oct 28 18:36:22 2008
@@ -60,6 +60,7 @@
 t/warnings.t
 
 t/live/computers4sure.t
+t/live/encoding.t
 t/live/wikipedia.t
 
 t/local/LocalServer.pm

Modified: trunk/libwww-mechanize-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/META.yml?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/META.yml (original)
+++ trunk/libwww-mechanize-perl/META.yml Tue Oct 28 18:36:22 2008
@@ -1,9 +1,11 @@
 --- #YAML:1.0
 name:                WWW-Mechanize
-version:             1.34
+version:             1.50
 abstract:            Handy web browsing in a Perl object
 license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.36
+author:              
+    - Andy Lester <andy at petdance.com>
+generated_by:        ExtUtils::MakeMaker version 6.44
 distribution_type:   module
 requires:     
     Carp:                          0
@@ -16,22 +18,15 @@
     HTML::TokeParser:              2.28
     HTTP::Daemon:                  0
     HTTP::Request:                 1.3
+    HTTP::Response::Encoding:      0.05
     HTTP::Status:                  0
-    LWP:                           5.802
-    LWP::UserAgent:                2.024
+    LWP:                           5.815
+    LWP::UserAgent:                5.815
     Pod::Usage:                    0
     Test::More:                    0.34
     URI:                           1.25
     URI::file:                     0
     URI::URL:                      0
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
-author:
-    - Andy Lester <andy at petdance.com>
-resources:
-    license: http://dev.perl.org/licenses/
-    homepage: http://code.google.com/p/www-mechanize/
-    bugtracker: http://code.google.com/p/www-mechanize/issues/list
-    Repository: http://code.google.com/p/www-mechanize/source
-    MailingList: http://groups.google.com/group/www-mechanize-users
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libwww-mechanize-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/Makefile.PL?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/Makefile.PL (original)
+++ trunk/libwww-mechanize-perl/Makefile.PL Tue Oct 28 18:36:22 2008
@@ -29,24 +29,25 @@
     AUTHOR          => 'Andy Lester <andy at petdance.com>',
     EXE_FILES       => [ 'bin/mech-dump' ],
     PREREQ_PM       => {
-        'Carp'              => 0,
-        'File::Temp'        => 0,
-        'FindBin'           => 0,
-        'Getopt::Long'      => 0,
-        'HTML::Form'        => 1.038,
-        'HTML::HeadParser'  => 0,
-        'HTML::Parser'      => 3.33,
-        'HTML::TokeParser'  => 2.28,
-        'HTTP::Daemon'      => 0,
-        'HTTP::Request'     => 1.30,
-        'HTTP::Status'      => 0,
-        'LWP'               => 5.802,
-        'LWP::UserAgent'    => 2.024,
-        'Pod::Usage'        => 0,
-        'Test::More'        => 0.34,
-        'URI'               => 1.25,
-        'URI::URL'          => 0,
-        'URI::file'         => 0,
+        'Carp'                     => 0,
+        'File::Temp'               => 0,
+        'FindBin'                  => 0,
+        'Getopt::Long'             => 0,
+        'HTML::Form'               => 1.038,
+        'HTML::HeadParser'         => 0,
+        'HTML::Parser'             => 3.33,
+        'HTML::TokeParser'         => 2.28,
+        'HTTP::Daemon'             => 0,
+        'HTTP::Request'            => 1.30,
+        'HTTP::Response::Encoding' => 0.05,
+        'HTTP::Status'             => 0,
+        'LWP'                      => 5.815,
+        'LWP::UserAgent'           => 5.815,
+        'Pod::Usage'               => 0,
+        'Test::More'               => 0.34,
+        'URI'                      => 1.25,
+        'URI::URL'                 => 0,
+        'URI::file'                => 0,
     },
     test            => { TESTS => join( ' ', @tests ) },
     clean           => { FILES => 'WWW-Mechanize-*' },

Modified: trunk/libwww-mechanize-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/changelog?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/changelog (original)
+++ trunk/libwww-mechanize-perl/debian/changelog Tue Oct 28 18:36:22 2008
@@ -1,10 +1,24 @@
-libwww-mechanize-perl (1.34-3) UNRELEASED; urgency=low
-
-  * Add debian/README.source to document quilt usage, as required by
+libwww-mechanize-perl (1.50-1) UNRELEASED; urgency=low
+  
+  TODO : Needs HTTP::Response::Encoding 
+   
+  [ gregor herrmann ]
+   * Add debian/README.source to document quilt usage, as required by
     Debian Policy since 3.8.0.
 
- -- gregor herrmann <gregoa at debian.org>  Wed, 06 Aug 2008 21:34:20 -0300
+  [ Rene Mayorga ]
+  * New upstream release
+  * debian/control
+    + set debhelper and compat version to 7
+    + set standards-version to 3.8.0
+    + add libtest-taint-perl to B-D-I
+  * debian/rules 
+    + refresh using dh-make-perl template
+    + re-add NOINTERNET var before test
+  * debian/patches - refresh patches
+  * debian/copyright - convert to the (new)format
 
+ -- Rene Mayorga <rmayorga at debian.org.sv>  Tue, 28 Oct 2008 11:57:50 -0600
 libwww-mechanize-perl (1.34-2) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libwww-mechanize-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/compat?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/compat (original)
+++ trunk/libwww-mechanize-perl/debian/compat Tue Oct 28 18:36:22 2008
@@ -1,1 +1,1 @@
-6
+7

Modified: trunk/libwww-mechanize-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/control?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/control (original)
+++ trunk/libwww-mechanize-perl/debian/control Tue Oct 28 18:36:22 2008
@@ -4,11 +4,11 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Jay Bonci <jaybonci at debian.org>, 
  Jaldhar H. Vyas <jaldhar at debian.org>, Rene Mayorga <rmayorga at debian.org.sv>
-Build-Depends: debhelper (>= 6), quilt
+Build-Depends: debhelper (>= 7), quilt
 Build-Depends-Indep: perl (>=5.6.0), libwww-perl (>= 5.68), 
  libhtml-parser-perl, liburi-perl, libtest-pod-perl, libio-socket-ssl-perl, 
- netbase, libtest-exception-perl, libtest-warn-perl
-Standards-Version: 3.7.3
+ netbase, libtest-exception-perl, libtest-warn-perl, libtest-taint-perl
+Standards-Version: 3.8.0
 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/wsvn/pkg-perl/trunk/libwww-mechanize-perl/

Modified: trunk/libwww-mechanize-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/copyright?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/copyright (original)
+++ trunk/libwww-mechanize-perl/debian/copyright Tue Oct 28 18:36:22 2008
@@ -1,38 +1,34 @@
-This package was debianized by Jay Bonci <jay at bonci.com> on
-Sat,  3 May 2003 02:58:24 -0400.
+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: ExtUtils-Command
 
-It was downloaded from http://search.cpan.org/author/PETDANCE/WWW-Mechanize-0.40
+Files: *
+Copyright: 2004-2007  Andy Lester. All rights reserved.
+License-Alias: Perl
+License: Artistic | GPL-1+
 
-Upstream Author: Andy Lester <andy at petdance.com> 
+Files: t/local/LocalServer.pm
+Copyright: 2003 Max Maischein <corion at cpan.org>
+License-Alias: Perl
+License: Artistic | GPL-1+
 
-Copyright:
-	Copyright (c) 2005-2007 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.
+Files: debian/*
+Copyright: 2003-2008, various members of the Debian Perl Group, cf
+  debian/changelog
+License: Artistic | 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
 
-t/local/LocalServer.pm:
-
-	Copyright (C) 2003 Max Maischein Max Maischein, <corion at cpan.org>	
-	This library is free software; you can redistribute it and/or 
-	modify it under the same terms as Perl itself.
-
-
-"Perl licese" is:
-	
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of either:
-
-    a) the GNU General Public License as published by the Free Software
-       Foundation; either version 1, or (at your option) any later
-       version, or
-
-    b) the "Artistic License" which comes with Perl.
-
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in `/usr/share/common-licenses/GPL' and the Artistic
-Licence in `/usr/share/common-licenses/Artistic'.
-
-The Debian packaging is (C) 2003, Jay Bonci <jay at debian.org> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
-	
+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'

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=26303&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 Tue Oct 28 18:36:22 2008
@@ -1,6 +1,6 @@
---- a/bin/mech-dump
-+++ b/bin/mech-dump
-@@ -114,3 +114,7 @@ sub dump_forms {
+--- libwww-mechanize-perl.orig/bin/mech-dump
++++ libwww-mechanize-perl/bin/mech-dump
+@@ -114,3 +114,7 @@
      $mech->dump_forms( undef, $absolute );
      return;
  }
@@ -8,9 +8,9 @@
 +=head1 SEE ALSO
 +
 +L<WWW::Mechanize>
---- a/lib/WWW/Mechanize/Cookbook.pod
-+++ b/lib/WWW/Mechanize/Cookbook.pod
-@@ -72,6 +72,10 @@ Find all links that have the word "downl
+--- libwww-mechanize-perl.orig/lib/WWW/Mechanize/Cookbook.pod
++++ libwww-mechanize-perl/lib/WWW/Mechanize/Cookbook.pod
+@@ -72,6 +72,10 @@
  Use Abe Timmerman's L<WWW::CheckSite>
  L<http://search.cpan.org/dist/WWW-CheckSite/>
  
@@ -21,9 +21,9 @@
  =head1 AUTHORS
  
  Copyright 2005 Andy Lester C<< <andy at petdance.com> >>
---- a/lib/WWW/Mechanize/Image.pm
-+++ b/lib/WWW/Mechanize/Image.pm
-@@ -116,6 +116,10 @@ sub url_abs {
+--- libwww-mechanize-perl.orig/lib/WWW/Mechanize/Image.pm
++++ libwww-mechanize-perl/lib/WWW/Mechanize/Image.pm
+@@ -116,6 +116,10 @@
      return $self->URI->abs;
  }
  
@@ -34,9 +34,9 @@
  =head1 COPYRIGHT
  
  Copyright (c) 2004 Andy Lester. All rights reserved. This program is
---- a/lib/WWW/Mechanize/Link.pm
-+++ b/lib/WWW/Mechanize/Link.pm
-@@ -111,6 +111,9 @@ sub url_abs {
+--- libwww-mechanize-perl.orig/lib/WWW/Mechanize/Link.pm
++++ libwww-mechanize-perl/lib/WWW/Mechanize/Link.pm
+@@ -111,6 +111,9 @@
  
      return $self->URI->abs;
  }

Modified: trunk/libwww-mechanize-perl/debian/patches/no_internet.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/patches/no_internet.patch?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/patches/no_internet.patch (original)
+++ trunk/libwww-mechanize-perl/debian/patches/no_internet.patch Tue Oct 28 18:36:22 2008
@@ -1,26 +1,25 @@
---- a/t/live/computers4sure.t
-+++ b/t/live/computers4sure.t
+--- libwww-mechanize-perl-1.50.orig/t/live/computers4sure.t
++++ libwww-mechanize-perl-1.50/t/live/computers4sure.t
 @@ -3,6 +3,10 @@
  use warnings;
  use strict;
  
 +if ($ENV{NOINTERNET} ) {
-+   use Test::More skip_all => "We don't have internet here";
++	use Test::More skip_all => "We don't have internet here" ; 
 +}
 +
- use Test::More skip_all => 'Still need to get the error-handling on here working';
  use Test::More tests => 9;
  
---- a/t/live/wikipedia.t
-+++ b/t/live/wikipedia.t
-@@ -3,6 +3,11 @@
+ BEGIN {
+--- libwww-mechanize-perl-1.50.orig/t/live/wikipedia.t
++++ libwww-mechanize-perl-1.50/t/live/wikipedia.t
+@@ -3,6 +3,10 @@
  use warnings;
  use strict;
  
 +if ($ENV{NOINTERNET} ) {
-+   use Test::More skip_all => "We don't have internet here";
++	use Test::More skip_all => "We don't have internet here";
 +}
-+
 +
  use constant LANGUAGES => qw( en it ja es nl pl );
  use Test::More tests => 3 + (2 * scalar LANGUAGES);

Modified: trunk/libwww-mechanize-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/debian/rules?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/debian/rules (original)
+++ trunk/libwww-mechanize-perl/debian/rules Tue Oct 28 18:36:22 2008
@@ -1,63 +1,27 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This is the debhelper compatibility version to use.
-#export DH_COMPAT=4
 
 include /usr/share/quilt/quilt.make
 
-
-PERL=/usr/bin/perl
-PACKAGE=$(shell dh_listpackages)
-
-PKGROOT=$(CURDIR)/debian/$(PACKAGE)/usr
-ETCROOT=$(PKGROOT)/share/$(PACKAGE)
-
 build: build-stamp
 build-stamp: $(QUILT_STAMPFN)
-	dh_testdir
-	# Add here commands to compile the package.
-	$(PERL) Makefile.PL verbose INSTALLDIRS=vendor --local --mech-dump
-	$(MAKE)
+	dh build --before test
 	NOINTERNET=1 $(MAKE) test
+	dh build --after test
 	touch $@
 
 clean: unpatch
-	dh_testdir
-	dh_testroot
-	dh_clean build-stamp install-stamp
-	[ ! -f Makefile ] || $(MAKE) realclean
-	dh_clean
+	dh $@
 
 install: install-stamp
 install-stamp: build-stamp
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	$(MAKE) install PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr
-	install -d $(ETCROOT)
-	install -m 644 $(CURDIR)/etc/* $(ETCROOT)
-	[ ! -d $(CURDIR)/debian/$(PACKAGE)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(CURDIR)/debian/$(PACKAGE)/usr/lib/perl5
+	dh install
 	touch $@
 
 binary-arch:
 
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs
-	dh_installchangelogs Changes
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_perl
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+binary-indep: install
+	dh $@
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+binary: binary-arch binary-indep
+
+.PHONY: binary binary-arch binary-indep install clean build

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=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm (original)
+++ trunk/libwww-mechanize-perl/lib/WWW/Mechanize.pm Tue Oct 28 18:36:22 2008
@@ -6,11 +6,11 @@
 
 =head1 VERSION
 
-Version 1.34
-
-=cut
-
-our $VERSION = '1.34';
+Version 1.50
+
+=cut
+
+our $VERSION = '1.50';
 
 =head1 SYNOPSIS
 
@@ -106,6 +106,7 @@
 use LWP::UserAgent 2.003;
 use HTML::Form 1.00;
 use HTML::TokeParser;
+use HTTP::Response::Encoding 0.05;
 
 use base 'LWP::UserAgent';
 
@@ -146,9 +147,26 @@
 
 =item * C<< autocheck => [0|1] >>
 
-Checks each request made to see if it was successful.  This saves you
-the trouble of manually checking yourself.  Any errors found are errors,
-not warnings.  Default is off.
+Checks each request made to see if it was successful.  This saves
+you the trouble of manually checking yourself.  Any errors found
+are errors, not warnings.
+
+The default value is ON, unless it's being subclassed, in which
+case it is OFF.  This means that standalone L<WWW::Mechanize>instances
+have autocheck turned on, which is protective for the vast majority
+of Mech users who don't bother checking the return value of get()
+and post() and can't figure why their code fails. However, if
+L<WWW::Mechanize> is subclassed, such as for L<Test::WWW::Mechanize>
+or L<Test::WWW::Mechanize::Catalyst>, this may not be an appropriate
+default, so it's off.
+
+=item * C<< noproxy => [0|1] >>
+
+Turn off the automatic call to the L<LWP::UserAgent> C<env_proxy> function.
+
+This needs to be explicitly turned off if you're using L<Crypt::SSLeay> to
+access a https site via a proxy server.  Note: you still need to set your
+HTTPS_PROXY environment variable as appropriate.
 
 =item * C<< onwarn => \&func >>
 
@@ -195,7 +213,7 @@
     );
 
     my %mech_parms = (
-        autocheck   => 0,
+        autocheck   => ($class eq 'WWW::Mechanize' ? 1 : 0),
         onwarn      => \&WWW::Mechanize::_warn,
         onerror     => \&WWW::Mechanize::_die,
         quiet       => 0,
@@ -223,7 +241,7 @@
         $self->{$parm} = $mech_parms{$parm};
     }
     $self->{page_stack} = [];
-    $self->env_proxy();
+    $self->env_proxy() unless $parent_parms{noproxy};
 
     # libwww-perl 5.800 (and before, I assume) has a problem where
     # $ua->{proxy} can be undef and clone() doesn't handle it.
@@ -392,7 +410,7 @@
 =head2 $mech->reload()
 
 Acts like the reload button in a browser: repeats the current
-request. The history (as per the L<back> method) is not altered.
+request. The history (as per the L</back> method) is not altered.
 
 Returns the L<HTTP::Response> object from the reload, or C<undef>
 if there's no current request.
@@ -556,30 +574,57 @@
 
     if ( $self->is_html ) {
         my %parms = @_;
+
         if ( exists $parms{base_href} ) {
-            my $arg = (delete $parms{base_href}) || $self->base;
-            $content=~s/<head>/<head>\n<base href="$arg">/i;
-        }
-        if ( my $arg = delete $parms{format} ) {
-            if ($arg eq 'text') {
-                require HTML::TreeBuilder;
-                my $tree = HTML::TreeBuilder->new();
-                $tree->parse($content);
-                $tree->eof();
-                $tree->elementify(); # just for safety
-                $content = $tree->as_text();
-                $tree->delete;
-            }
-            else {
-                $self->die( qq{Unknown "format" parameter "$arg"} );
-            }
-        }
-        for my $cmd ( sort keys %parms ) {
-            $self->die( qq{Unknown named argument "$cmd"} );
-        }
-    } # is HTML
+            my $base_href = (delete $parms{base_href}) || $self->base;
+            $content=~s/<head>/<head>\n<base href="$base_href">/i;
+        }
+
+        if ( my $format = delete $parms{format} ) {
+            $content = $self->_format_content( $format, $content );
+        }
+
+        $self->_check_unhandled_parms( %parms );
+    }
 
     return $content;
+}
+
+sub _format_content {
+    my $self = shift;
+    my $format = shift;
+    my $content = shift;
+
+    if ( $format eq 'text' ) {
+        return $self->_content_as_text($content);
+    }
+    else {
+        $self->die( qq{Unknown "format" parameter "$format"} );
+    }
+}
+
+sub _content_as_text {
+    my $self = shift;
+    my $content = shift;
+
+    require HTML::TreeBuilder;
+    my $tree = HTML::TreeBuilder->new();
+    $tree->parse($content);
+    $tree->eof();
+    $tree->elementify(); # just for safety
+    my $formatted_content = $tree->as_text();
+    $tree->delete;
+
+    return $formatted_content;
+}
+
+sub _check_unhandled_parms {
+    my $self  = shift;
+    my %parms = @_;
+
+    for my $cmd ( sort keys %parms ) {
+        $self->die( qq{Unknown named argument "$cmd"} );
+    }
 }
 
 =head1 LINK METHODS
@@ -858,7 +903,7 @@
 =head2 $mech->find_all_links( ... )
 
 Returns all the links on the current page that match the criteria.  The
-method for specifying link criteria is the same as in C<L<find_link()>>.
+method for specifying link criteria is the same as in C<L</find_link()>>.
 Each of the links returned is a L<WWW::Mechanize::Link> object.
 
 In list context, C<find_all_links()> returns a list of the links.
@@ -1086,7 +1131,7 @@
 =head2 $mech->find_all_images( ... )
 
 Returns all the images on the current page that match the criteria.  The
-method for specifying image criteria is the same as in C<L<find_image()>>.
+method for specifying image criteria is the same as in C<L</find_image()>>.
 Each of the images returned is a L<WWW::Mechanize::Image> object.
 
 In list context, C<find_all_images()> returns a list of the images.
@@ -1121,11 +1166,11 @@
 =head2 $mech->form_number($number)
 
 Selects the I<number>th form on the page as the target for subsequent
-calls to C<L<field()>> and C<L<click()>>.  Also returns the form that was
+calls to C<L</field()>> and C<L</click()>>.  Also returns the form that was
 selected.
 
 If it is found, the form is returned as an L<HTML::Form> object and set internally
-for later use with Mech's form methods such as C<L<field()>> and C<L<click()>>.
+for later use with Mech's form methods such as C<L</field()>> and C<L</click()>>.
 
 Emits a warning and returns undef if no form is found.
 
@@ -1154,7 +1199,7 @@
 generated.
 
 If it is found, the form is returned as an L<HTML::Form> object and set internally
-for later use with Mech's form methods such as C<L<field()>> and C<L<click()>>.
+for later use with Mech's form methods such as C<L</field()>> and C<L</click()>>.
 
 Returns undef if no form is found.
 
@@ -1185,7 +1230,7 @@
 and a warning is generated.
 
 If it is found, the form is returned as an L<HTML::Form> object and set internally
-for later used with Mech's form methods such as C<L<field()>> and C<L<click()>>.
+for later used with Mech's form methods such as C<L</field()>> and C<L</click()>>.
 
 Returns undef if no form is found.
 
@@ -1222,9 +1267,10 @@
 
 =head2 $mech->field( $name, \@values, $number )
 
-Given the name of a field, set its value to the value specified.  This
-applies to the current form (as set by the L<form_name()> or L<form_number()> method or defaulting
-to the first form on the page).
+Given the name of a field, set its value to the value specified.
+This applies to the current form (as set by the L</form_name()> or
+L</form_number()> method or defaulting to the first form on the
+page).
 
 The optional I<$number> parameter is used to distinguish between two fields
 with the same name.  The fields are numbered from 1.
@@ -1258,7 +1304,8 @@
 C<$value> is an array, only the B<first> value will be set.  [Note:
 the documentation previously claimed that only the last value would
 be set, but this was incorrect.]  Passing C<$value> as a hash with
-an C<n> key selects an item by number (e.g. C<{n => 3> or C<{n => [2,4]}>).
+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.
 
 Returns 1 on successfully setting the value. On failure, returns
@@ -1662,32 +1709,32 @@
 fields mentioned in C<\%fields>.  This is nice because you don't need to know
 the name or number of the form to do this.
 
-(calls C<L<form_with_fields>> and C<L<set_fields()>>).
+(calls C<L</form_with_fields()>> and C<L</set_fields()>>).
 
 If you choose this, the form_number, form_name and fields options will be ignored.
 
 =item * form_number => n
 
-Selects the I<n>th form (calls C<L<form_number()>>).  If this parm is not
+Selects the I<n>th form (calls C<L</form_number()>>).  If this parm is not
 specified, the currently-selected form is used.
 
 =item * form_name => name
 
-Selects the form named I<name> (calls C<L<form_name()>>)
+Selects the form named I<name> (calls C<L</form_name()>>)
 
 =item * button => button
 
-Clicks on button I<button> (calls C<L<click()>>)
+Clicks on button I<button> (calls C<L</click()>>)
 
 =item * x => x, y => y
 
-Sets the x or y values for C<L<click()>>
+Sets the x or y values for C<L</click()>>
 
 =back
 
 If no form is selected, the first form found is used.
 
-If I<button> is not passed, then the C<L<submit()>> method is used instead.
+If I<button> is not passed, then the C<L</submit()>> method is used instead.
 
 Returns an L<HTTP::Response> object.
 
@@ -2145,10 +2192,8 @@
     $self->_reset_page;
 
     # Try to decode the content. Undef will be returned if there's nothing to decompress.
-    # See docs in HTTP::Message for details. Do we need to expose the options there? 
-    # use charset => 'none' because while we want LWP to handle Content-Encoding for 
-    # the auto-gzipping with Compress::Zlib we don't want it messing with charset
-    my $content = $res->decoded_content( charset => 'none' );
+    # See docs in HTTP::Message for details. Do we need to expose the options there?
+    my $content = $res->decoded_content();
     $content = $res->content if (not defined $content);
 
     $content .= _taintedness();
@@ -2684,6 +2729,7 @@
 Thanks to the numerous people who have helped out on WWW::Mechanize in
 one way or another, including
 Kirrily Robert for the original C<WWW::Automate>,
+Michael Schwern,
 Adriano Ferreira,
 Miyagawa,
 Peteris Krumins,
@@ -2725,7 +2771,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2005-2007 Andy Lester. All rights reserved. This program is
+Copyright (c) 2005-2008 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/FAQ.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod (original)
+++ trunk/libwww-mechanize-perl/lib/WWW/Mechanize/FAQ.pod Tue Oct 28 18:36:22 2008
@@ -77,7 +77,7 @@
 Javascript function. Do a regular expression match on
 C<< $mech->content() >>
 to find the link that you want and C<< $mech->get >> it directly (this
-assumes that you know what your are looking for in advance).
+assumes that you know what you are looking for in advance).
 
 In more difficult cases, the Javascript is used for URL mangling to
 satisfy the needs of some middleware. In this case you need to figure

Modified: trunk/libwww-mechanize-perl/t/autocheck.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/autocheck.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/autocheck.t (original)
+++ trunk/libwww-mechanize-perl/t/autocheck.t Tue Oct 28 18:36:22 2008
@@ -24,7 +24,7 @@
 }
 
 AUTOCHECK_OFF: {
-    my $mech = WWW::Mechanize->new;
+    my $mech = WWW::Mechanize->new( autocheck => 0 );
     isa_ok( $mech, 'WWW::Mechanize' );
 
     $mech->get( NONEXISTENT );
@@ -32,7 +32,7 @@
 }
 
 AUTOCHECK_ON: {
-    my $mech = WWW::Mechanize->new( autocheck => 1 );
+    my $mech = WWW::Mechanize->new;
     isa_ok( $mech, 'WWW::Mechanize' );
 
     dies_ok {

Modified: trunk/libwww-mechanize-perl/t/find_link_id.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/find_link_id.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/find_link_id.t (original)
+++ trunk/libwww-mechanize-perl/t/find_link_id.t Tue Oct 28 18:36:22 2008
@@ -2,7 +2,7 @@
 
 use warnings;
 use strict;
-use Test::More no_plan => 1;
+use Test::More 'no_plan';
 use URI::file;
 
 BEGIN {

Modified: trunk/libwww-mechanize-perl/t/live/computers4sure.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/live/computers4sure.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/live/computers4sure.t (original)
+++ trunk/libwww-mechanize-perl/t/live/computers4sure.t Tue Oct 28 18:36:22 2008
@@ -3,7 +3,6 @@
 use warnings;
 use strict;
 
-use Test::More skip_all => 'Still need to get the error-handling on here working';
 use Test::More tests => 9;
 
 BEGIN {
@@ -33,7 +32,6 @@
 $mech->get( $link_str );
 is( $mech->response->code, 200, "Fetched $link_str" );
 ok( $mech->content =~ /Your price/i, 'Found a likely phrase in the second page' );
-#print $mech->content;
 
 SKIP: {
     eval 'use Test::Memory::Cycle';
@@ -41,4 +39,3 @@
 
     memory_cycle_ok( $mech, 'No memory cycles found' );
 }
-

Modified: trunk/libwww-mechanize-perl/t/local/back.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/local/back.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/local/back.t (original)
+++ trunk/libwww-mechanize-perl/t/local/back.t Tue Oct 28 18:36:22 2008
@@ -113,7 +113,7 @@
     memory_cycle_ok( $mech, 'No memory cycles found' );
 }
 
-$mech = WWW::Mechanize->new();
+$mech = WWW::Mechanize->new( autocheck => 0 );
 isa_ok( $mech, 'WWW::Mechanize' );
 $mech->get( $server->url );
 ok( $mech->success, 'Got root URL' );

Modified: trunk/libwww-mechanize-perl/t/local/failure.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/local/failure.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/local/failure.t (original)
+++ trunk/libwww-mechanize-perl/t/local/failure.t Tue Oct 28 18:36:22 2008
@@ -24,7 +24,7 @@
 isa_ok( $server, 'LocalServer' );
 
 
-my $mech = WWW::Mechanize->new;
+my $mech = WWW::Mechanize->new( autocheck => 0 );
 isa_ok( $mech, 'WWW::Mechanize', 'Created object' );
 
 GOOD_PAGE: {

Modified: trunk/libwww-mechanize-perl/t/local/follow.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/local/follow.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/local/follow.t (original)
+++ trunk/libwww-mechanize-perl/t/local/follow.t Tue Oct 28 18:36:22 2008
@@ -6,6 +6,7 @@
 use Test::More tests => 21;
 use lib 't/local';
 use LocalServer;
+use encoding 'iso-8859-1';
 
 BEGIN {
     delete @ENV{ grep { lc eq 'http_proxy' } keys %ENV };

Modified: trunk/libwww-mechanize-perl/t/local/get.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/local/get.t?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/local/get.t (original)
+++ trunk/libwww-mechanize-perl/t/local/get.t Tue Oct 28 18:36:22 2008
@@ -57,7 +57,7 @@
 ok( $agent->is_html, 'is HTML' );
 is( $agent->title, 'WWW::Mechanize::Shell test page', 'Title matches' );
 like( $agent->content, qr/WWW::Mechanize::Shell test page/, 'Got the right page' );
-my $rslength = length $agent->content;
+my $rslength = do {use bytes; length $agent->content};
 
 my $tempfile = './temp';
 unlink $tempfile;

Modified: trunk/libwww-mechanize-perl/t/local/log-server
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-mechanize-perl/t/local/log-server?rev=26303&op=diff
==============================================================================
--- trunk/libwww-mechanize-perl/t/local/log-server (original)
+++ trunk/libwww-mechanize-perl/t/local/log-server Tue Oct 28 18:36:22 2008
@@ -3,6 +3,7 @@
 use strict;
 use HTTP::Daemon;
 use CGI;
+use encoding 'iso-8859-1';
 
 $|++;
 
@@ -16,6 +17,7 @@
 };
 open LOG, ">", $logfile
   or die "Couldn't create logfile '$logfile' : $!\n";
+binmode DATA,':encoding(iso-8859-1)';
 my $body = join "", <DATA>;
 
 sub debug($) {




More information about the Pkg-perl-cvs-commits mailing list