can't call "traverse" without object?

Jimmy Patrick (jimmyp@marimba.com)
Wed, 25 Mar 1998 13:05:20 -0800


Can anyone tell me where I'm going wrong here?

Here is a script to get some weather info:

#!/usr/local/bin/perl
use LWP::UserAgent;
require HTML::FormatText;

$ua = new LWP::UserAgent;
$ua->agent("weatherbug/0.1 " . $ua->agent);

my $req = new HTTP::Request POST =>
'http://www.met.fsu.edu/weather/weather.cgi';
$req->content_type('application/x-www-form-urlencoded');
$req->content('what=metarfull&entry1=SFO&time=1');

my $res = $ua->request($req);
$formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50);

if ($res->is_success){
     print $formatter->format($res->content);
} else {
    print "It didn't work.\n"
}


This is the result I get:

Can't call method "traverse" without a package or object reference at
/usr/local/lib/perl5/site_perl/HTML/Formatter.pm line 91.

Thanks,

jimmy
--
jimmy patrick
jimmyp@marimba.com
650-930-5242