in reply to Re^2: Using Mechanize to download a zip file?
in thread Using Mechanize to download a zip file?

The module might be still broken; when I attempt to use the $mech->save_content method in this code:

use strict; use warnings; use LWP::UserAgent; use WWW::Mechanize; use Win32::FileOp; #use Win32::FileOp qw(ShellExecute); # ShellExecute("http://finance.yahoo.com"); my $mech = WWW::Mechanize->new(); $mech->get("http://finance.yahoo.com"); my $filename = 'c:yahoo.html'; $mech->save_content ( $filename );


I get the following message:
Can't locate object method "save_content" via package "WWW::Mechanize" at Yahoo. pl line 13, <DATA> line 164.

Replies are listed 'Best First'.
Re^4: Using Mechanize to download a zip file?
by PodMaster (Abbot) on May 13, 2006 at 03:13 UTC
    The module might be still broken;
    Not in that regard.
    http://search.cpan.org/src/PETDANCE/WWW-Mechanize-1.18/Changes
    1.05_02 Sat Oct  2 16:55:59 CDT 2004
        [ENHANCEMENTS]
        * Added the $mech->save_content( $filename ) function, so you
              can dump stuff to files easily.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.