Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 11257
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize

People
Owner: Nobody in particular
Requestors: jrwren [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.02
Fixed in: (no value)



Subject: Test::Builder requires a plan
Test-WWW-Mechanize-1.02 perl v5.8.6 CYGWIN_NT-5.1 The wrong output is on the call to title_is, or presumably any of the functions of Test-WWW-Mechanize that use $Test [output] You tried to run a test without a plan! Gotta have a plan. at /usr/lib/perl5/site_perl/5.8/Test/LongString.pm line 130 # Looks like your test died before it could output anything. [/output] [code] my $mech = Test::WWW::Mechanize->new(); $mech->get("www.yahoo.com"); $mech->title_is("Yahoo!"); [/code] [fix] please add $Test->no_plan(); as a new line after line 45. Test::Builder version 0.17 requires a plan to work, this goes back to the old behavior. [/fix] [patch] --- /usr/lib/perl5/site_perl/5.8/Test/WWW/Mechanize.pm 2005-01-27 08:52:06.6561 55000 -0500 +++ /usr/lib/perl5/site_perl/5.8/Test/WWW/Mechanize.pm~ 2005-01-27 08:52:33.5602 94500 -0500 @@ -43,6 +43,7 @@ use base 'WWW::Mechanize'; my $Test = Test::Builder->new(); +$Test->no_plan(); =head1 CONSTRUCTOR [/patch]
[guest - Thu Jan 27 08:57:39 2005]: Show quoted text
> [fix] > please add $Test->no_plan(); as a new line after line 45.
Right problem, wrong fix. This would make Test::WWW::Mechanize no longer play nice with other modules. use Test::More tests => 5; use Test::WWW::Mechanize; # tries to set no_plan and barfs. The proper solution is to better document that Test::WWW::Mechanize requires something else to set up the plan. Something as simple as adding use Test::More tests => 4; to the SYNOPSIS would give users the right hint.
Added in 1.14.