r73494 - in /branches/upstream/libwww-mechanize-perl/current: ./ lib/WWW/ t/ t/local/

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Mon Apr 25 11:21:00 UTC 2011


Author: periapt-guest
Date: Mon Apr 25 11:20:47 2011
New Revision: 73494

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73494
Log:
[svn-upgrade] new version libwww-mechanize-perl (1.68)

Added:
    branches/upstream/libwww-mechanize-perl/current/MANIFEST.SKIP
    branches/upstream/libwww-mechanize-perl/current/t/content.t
    branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.html
    branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.t
    branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.html
    branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.t
Modified:
    branches/upstream/libwww-mechanize-perl/current/Changes
    branches/upstream/libwww-mechanize-perl/current/MANIFEST
    branches/upstream/libwww-mechanize-perl/current/META.yml
    branches/upstream/libwww-mechanize-perl/current/Makefile.PL
    branches/upstream/libwww-mechanize-perl/current/lib/WWW/Mechanize.pm
    branches/upstream/libwww-mechanize-perl/current/t/autocheck.t
    branches/upstream/libwww-mechanize-perl/current/t/local/failure.t

Modified: branches/upstream/libwww-mechanize-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/Changes?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/Changes (original)
+++ branches/upstream/libwww-mechanize-perl/current/Changes Mon Apr 25 11:20:47 2011
@@ -1,12 +1,23 @@
 Revision history for WWW::Mechanize
-
-Please note that WWW::Mechanize and Test::WWW::Mechanize are no
-longer using rt.cpan.org for bug tracking.  They are now being
-tracked via Google Code at
-http://code.google.com/p/www-mechanize/issues/list
 
 Mech now has its own mailing list at Google Groups:
 http://groups.google.com/group/www-mechanize-users
+
+1.68        Fri Apr 22 01:10:40 EST 2011
+========================================
+No changes from 1.67_01
+
+1.67_01
+========================================
+[ANNOUNCE]
+As of this release, Jesse Vincent has taken over maintenance of
+WWW-Mechanize.  The project's repository can be found at:
+
+ https://github.com/bestpractical/www-mechanize
+
+
+[FIXED]
+Added prereq for HTML::TreeBuilder.
 
 
 1.66        Fri Sep 10 16:25:44 CDT 2010

Modified: branches/upstream/libwww-mechanize-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/MANIFEST?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/MANIFEST (original)
+++ branches/upstream/libwww-mechanize-perl/current/MANIFEST Mon Apr 25 11:20:47 2011
@@ -1,22 +1,16 @@
+bin/mech-dump
 Changes
-Makefile.PL
-MANIFEST
-perlcriticrc
-
-bin/mech-dump
-
 etc/www-mechanize-logo.png
-
 lib/WWW/Mechanize.pm
 lib/WWW/Mechanize/Cookbook.pod
 lib/WWW/Mechanize/Examples.pod
 lib/WWW/Mechanize/FAQ.pod
 lib/WWW/Mechanize/Image.pm
 lib/WWW/Mechanize/Link.pm
-
-t/TestServer.pm
-t/Tools.pm
-
+Makefile.PL
+MANIFEST			This list of files
+MANIFEST.SKIP
+perlcriticrc
 t/00-load.t
 t/add_header.t
 t/aliases.t
@@ -24,9 +18,10 @@
 t/area_link.t
 t/autocheck.t
 t/clone.t
+t/content.t
 t/cookies.t
+t/credentials-api.t
 t/credentials.t
-t/credentials-api.t
 t/die.t
 t/field.html
 t/field.t
@@ -41,6 +36,8 @@
 t/find_link_id.html
 t/find_link_id.t
 t/form-parsing.t
+t/form_with_fields.html
+t/form_with_fields.t
 t/frames.html
 t/frames.t
 t/google.html
@@ -50,6 +47,26 @@
 t/link-base.t
 t/link-relative.t
 t/link.t
+t/live/encoding.t
+t/live/wikipedia.t
+t/local/back.t
+t/local/click.t
+t/local/click_button.t
+t/local/failure.t
+t/local/follow.t
+t/local/form.t
+t/local/get.t
+t/local/LocalServer.pm
+t/local/log-server
+t/local/nonascii.html
+t/local/nonascii.t
+t/local/overload.t
+t/local/page_stack.t
+t/local/referer-server
+t/local/referer.t
+t/local/reload.t
+t/local/submit.t
+t/mech-dump/mech-dump.t
 t/new.t
 t/pod-coverage.t
 t/pod.t
@@ -58,32 +75,13 @@
 t/select.html
 t/select.t
 t/taint.t
+t/TestServer.pm
 t/tick.html
 t/tick.t
+t/Tools.pm
 t/untaint.t
 t/upload.html
 t/upload.t
 t/warn.t
 t/warnings.t
-
-t/live/encoding.t
-t/live/wikipedia.t
-
-t/local/LocalServer.pm
-t/local/back.t
-t/local/click.t
-t/local/click_button.t
-t/local/failure.t
-t/local/follow.t
-t/local/form.t
-t/local/get.t
-t/local/log-server
-t/local/overload.t
-t/local/page_stack.t
-t/local/referer-server
-t/local/referer.t
-t/local/reload.t
-t/local/submit.t
-
-t/mech-dump/mech-dump.t
 META.yml                                 Module meta-data (added by MakeMaker)

Added: branches/upstream/libwww-mechanize-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/MANIFEST.SKIP?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libwww-mechanize-perl/current/MANIFEST.SKIP Mon Apr 25 11:20:47 2011
@@ -1,0 +1,11 @@
+^Makefile$
+blib
+pm_to_blib
+.swp$
+~$
+.tmp$
+.bak$
+.git/
+.gitignore$
+.shipit$
+^tags$

Modified: branches/upstream/libwww-mechanize-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/META.yml?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/META.yml (original)
+++ branches/upstream/libwww-mechanize-perl/current/META.yml Mon Apr 25 11:20:47 2011
@@ -1,9 +1,9 @@
 --- #YAML:1.0
 name:               WWW-Mechanize
-version:            1.66
+version:            1.68
 abstract:           Handy web browsing in a Perl object
 author:
-    - Andy Lester <andy at petdance.com>
+    - Jesse Vincent <jesse at bestpractical.com>
 license:            perl
 distribution_type:  module
 configure_requires:
@@ -19,6 +19,7 @@
     HTML::HeadParser:     0
     HTML::Parser:         3.33
     HTML::TokeParser:     2.28
+    HTML::TreeBuilder:    0
     HTTP::Daemon:         0
     HTTP::Request:        1.3
     HTTP::Server::Simple:  0.35
@@ -35,15 +36,15 @@
     URI::URL:             0
 resources:
     bugtracker:   http://code.google.com/p/www-mechanize/issues/list
-    homepage:     http://code.google.com/p/www-mechanize/
+    homepage:     https://github.com/bestpractical/www-mechanize
     license:      http://dev.perl.org/licenses/
     MailingList:  http://groups.google.com/group/www-mechanize-users
-    Repository:   http://code.google.com/p/www-mechanize/source
+    Repository:   https://github.com/bestpractical/www-mechanize
 no_index:
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.56
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libwww-mechanize-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/Makefile.PL?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/Makefile.PL (original)
+++ branches/upstream/libwww-mechanize-perl/current/Makefile.PL Mon Apr 25 11:20:47 2011
@@ -26,7 +26,7 @@
     NAME            => 'WWW::Mechanize',
     VERSION_FROM    => 'lib/WWW/Mechanize.pm', # finds $VERSION
     ABSTRACT_FROM   => 'lib/WWW/Mechanize.pm', # retrieve abstract from module
-    AUTHOR          => 'Andy Lester <andy at petdance.com>',
+    AUTHOR          => 'Jesse Vincent <jesse at bestpractical.com>',
     EXE_FILES       => [ 'bin/mech-dump' ],
     PREREQ_PM       => {
         'Carp'                      => 0,
@@ -37,6 +37,7 @@
         'HTML::HeadParser'          => 0,
         'HTML::Parser'              => 3.33,
         'HTML::TokeParser'          => 2.28,
+        'HTML::TreeBuilder'         => 0,
         'HTTP::Daemon'              => 0,
         'HTTP::Request'             => 1.30,
         'HTTP::Server::Simple'      => 0.35,
@@ -62,9 +63,9 @@
     $parms->{META_MERGE} = {
         resources => {
             license     => 'http://dev.perl.org/licenses/',
-            homepage    => 'http://code.google.com/p/www-mechanize/',
+            homepage    => 'https://github.com/bestpractical/www-mechanize',
             bugtracker  => 'http://code.google.com/p/www-mechanize/issues/list',
-            Repository  => 'http://code.google.com/p/www-mechanize/source',
+            Repository  => 'https://github.com/bestpractical/www-mechanize',
             MailingList => 'http://groups.google.com/group/www-mechanize-users',
         }
     };

Modified: branches/upstream/libwww-mechanize-perl/current/lib/WWW/Mechanize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/lib/WWW/Mechanize.pm?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/lib/WWW/Mechanize.pm (original)
+++ branches/upstream/libwww-mechanize-perl/current/lib/WWW/Mechanize.pm Mon Apr 25 11:20:47 2011
@@ -10,7 +10,7 @@
 
 =cut
 
-our $VERSION = '1.66';
+our $VERSION = '1.68';
 
 =head1 SYNOPSIS
 
@@ -2751,17 +2751,13 @@
 
 __END__
 
-=head1 REQUESTS & BUGS
-
-The bug queue for WWW::Mechanize and Test::WWW::Mechanize is at
-L<http://code.google.com/p/www-mechanize/issues/list>.  Please do
-not add any tickets to the old queue at L<http://rt.cpan.org/>.
-
-=head1 WWW::MECHANIZE'S SUBVERSION REPOSITORY
-
-Mech and Test::WWW::Mechanize are both hosted at Google Code:
-http://code.google.com/p/www-mechanize/.  The Subversion repository
-is at http://www-mechanize.googlecode.com/svn/wm/.
+=head1 WWW::MECHANIZE'S GIT REPOSITORY
+
+WWW::Mechanize is hosted at GitHub, though the bug tracker still
+lives at Google Code.
+
+Repository: https://github.com/bestpractical/www-mechanize/.  
+Bugs: http://code.google.com/p/www-mechanize/issues
 
 =head1 OTHER DOCUMENTATION
 

Modified: branches/upstream/libwww-mechanize-perl/current/t/autocheck.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/autocheck.t?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/autocheck.t (original)
+++ branches/upstream/libwww-mechanize-perl/current/t/autocheck.t Mon Apr 25 11:20:47 2011
@@ -16,7 +16,7 @@
 my @results = gethostbyname( $NONEXISTENT );
 if ( @results ) {
     my ($name,$aliases,$addrtype,$length, at addrs) = @results;
-    my $ip = join( '.', unpack('W4',$addrs[0]) );
+    my $ip = join( '.', unpack('C4',$addrs[0]) );
     plan skip_all => "Your ISP is overly helpful and returns $ip for non-existent domain $NONEXISTENT. This test cannot be run.";
 }
 my $bad_url = "http://$NONEXISTENT/";

Added: branches/upstream/libwww-mechanize-perl/current/t/content.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/content.t?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/content.t (added)
+++ branches/upstream/libwww-mechanize-perl/current/t/content.t Mon Apr 25 11:20:47 2011
@@ -1,0 +1,65 @@
+#!perl
+
+use warnings;
+use strict;
+use Test::More tests => 5;
+
+=head1 NAME
+
+content.t
+
+=head1 SYNOPSIS
+
+Tests the transforming forms of $mech->content().
+
+=cut
+
+BEGIN { delete @ENV{ qw( http_proxy HTTP_PROXY ) }; }
+BEGIN {
+    use_ok( 'WWW::Mechanize' );
+}
+
+my $html = <<'HTML';
+<html>
+<head>
+<title>Howdy?</title>
+</head>
+<body>
+Fine, thx!
+</body>
+</html>
+HTML
+
+
+my $mech = WWW::Mechanize->new();
+# Well actually there is no base (and therefore it does not belong to us
+# :-), so let's kludge a bit.
+$mech->{base} = 'http://example.com/';
+$mech->update_html($html);
+
+=head2 $mech->content(format => "text")
+
+=cut
+
+SKIP: {
+    eval 'use HTML::TreeBuilder';
+    skip 'HTML::TreeBuilder not installed', 2 if $@;
+
+    my $text = $mech->content(format => 'text');
+    like( $text, qr/Fine/, 'Found Fine' );
+    unlike( $text, qr/html/i, 'Could not find "html"' );
+}
+
+=head2 $mech->content(base_href => undef)
+
+=head2 $mech->content(base_href => $basehref)
+
+=cut
+
+my $content = $mech->content(base_href => 'foo');
+like($content, qr/base href="foo"/, 'Found the base href');
+
+
+$content = $mech->content(base_href => undef);
+like($content, qr[base href="http://example.com/"], 'Found the new base href');
+

Added: branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.html
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.html?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.html (added)
+++ branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.html Mon Apr 25 11:20:47 2011
@@ -1,0 +1,16 @@
+<html>
+<body>
+
+<form action="http://localhost/" method="post" enctype="multipart/form-data" name="1st_form">
+    <input type="text" name="1a"  />
+    <input type="text" name="1b"  />
+    <input type="Submit" name="submit" value="Submit" label="Sumbit" />
+</form>
+
+<form action="http://localhost/" method="post" name="2nd_form">
+    <input type="text" name="opt[2]"  /> Like in PHP!
+    <input type="text" name="1b"  />
+    <input type="Submit" name="submit" value="Submit" label="Sumbit" />
+</form>
+
+</body>

Added: branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.t?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.t (added)
+++ branches/upstream/libwww-mechanize-perl/current/t/form_with_fields.t Mon Apr 25 11:20:47 2011
@@ -1,0 +1,44 @@
+#!perl -Tw
+
+use warnings;
+use strict;
+use Test::More 'no_plan';
+use URI::file ();
+
+BEGIN {
+    delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};  # Placates taint-unsafe Cwd.pm in 5.6.1
+    use_ok( 'WWW::Mechanize' );
+}
+
+my $mech = WWW::Mechanize->new( cookie_jar => undef, autocheck => 0 );
+isa_ok( $mech, 'WWW::Mechanize' );
+my $uri = URI::file->new_abs( 't/form_with_fields.html' )->as_string;
+
+$mech->get( $uri );
+ok( $mech->success, "Fetched $uri" ) or die q{Can't get test page};
+
+{ 
+    my $test = 'dies with no input';
+    eval{  my $form = $mech->form_with_fields(); };
+    ok($@,$test);
+}
+
+{
+    my $form = $mech->form_with_fields(qw/1b/);
+    isa_ok( $form, 'HTML::Form' );
+    is($form->attr('name'), '1st_form', 'first form matches');
+}
+
+{
+    my $form = $mech->form_with_fields('1b', 'opt[2]');
+    isa_ok( $form, 'HTML::Form' );
+    is($form->attr('name'), '2nd_form', 'second form matches');
+}
+
+{
+    $mech->get($uri);
+    eval { $mech->submit_form( 
+            with_fields => { '1b' => '', 'opt[2]' => '' },
+        ); };
+    is($@,'', ' submit_form( with_fields => %data ) ' );
+}

Modified: branches/upstream/libwww-mechanize-perl/current/t/local/failure.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/local/failure.t?rev=73494&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/local/failure.t (original)
+++ branches/upstream/libwww-mechanize-perl/current/t/local/failure.t Mon Apr 25 11:20:47 2011
@@ -17,7 +17,7 @@
 my @results = gethostbyname( $NONEXISTENT );
 if ( @results ) {
     my ($name,$aliases,$addrtype,$length, at addrs) = @results;
-    my $ip = join( '.', unpack('W4',$addrs[0]) );
+    my $ip = join( '.', unpack('C4',$addrs[0]) );
     plan skip_all => "Your ISP is overly helpful and returns $ip for non-existent domain $NONEXISTENT. This test cannot be run.";
 }
 my $bad_url = "http://$NONEXISTENT/";

Added: branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.html
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.html?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.html (added)
+++ branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.html Mon Apr 25 11:20:47 2011
@@ -1,0 +1,14 @@
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
+
+<title>Query Builder</title>
+</head>
+  <body id="comp-Search-Build">
+<form method="post" action="Build.html" name="BuildQuery">
+<input name="ValueOf&#39;CF.{Ñ‚}&#39;" size="20" />
+</form>
+  </body>
+</html>

Added: branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.t?rev=73494&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.t (added)
+++ branches/upstream/libwww-mechanize-perl/current/t/local/nonascii.t Mon Apr 25 11:20:47 2011
@@ -1,0 +1,28 @@
+#!perl
+
+use utf8;
+use warnings;
+use strict;
+use Test::More tests => 5;
+use lib 't/local';
+use LocalServer;
+
+BEGIN {
+    delete @ENV{ grep { lc eq 'http_proxy' } keys %ENV };
+    delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) };
+    use_ok( 'WWW::Mechanize' );
+}
+
+my $server = LocalServer->spawn( file => 't/local/nonascii.html' );
+isa_ok( $server, 'LocalServer' );
+
+my $agent = WWW::Mechanize->new;
+isa_ok( $agent, 'WWW::Mechanize', 'Created object' );
+$agent->quiet(0);
+
+$agent->get( $server->url );
+ok( $agent->success, 'Got some page' );
+
+# \321\202 is \x{442}
+$agent->field("ValueOf'CF.{\321\202}'", "\321\201");
+is($agent->value("ValueOf'CF.{\321\202}'"), "\321\201", 'set utf value');




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