Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: www::mechanize executable

by fixon (Initiate)
on Oct 18, 2012 at 16:25 UTC ( #999766=note: print w/ replies, xml ) Need Help??


in reply to Re: www::mechanize executable
in thread www::mechanize executable

I did exactly that for the pp to create the .exe package

Here is my code, please take a quick look if you see anything that might be causing the problem when creating the .exe. Thank you very much

use strict; use Spreadsheet::WriteExcel; use WWW::Mechanize; # Create a new instance of Mechanize my $bot = WWW::Mechanize->new(); $bot->agent_alias( 'Windows Mozilla' ); # Connect to the login page my $response = $bot->get( 'https://anyURLwithCredentials.com' ); # Get the login form. You might need to change the number. $bot->form_number(3); # Enter the login credentials. $bot->field( username => 'username' ); $bot->field( password => 'password' ); $response = $bot->click(); my $outfile = "out.txt"; open(OUTFILE, ">$outfile"); print OUTFILE $response->decoded_content; close(OUTFILE); open(FILE,$outfile); my @releasesAU; my @releasesAU3G; while (<FILE>) { chomp; my $lineDATA = $_; if(index($lineDATA, "H") != -1){ if( $lineDATA =~ /">([_+\w]*)<\/a>/){ print $1, "\n"; push(@releasesAU3G,$1); } } if(index($lineDATA, "H+") != -1){ if( $lineDATA =~ /">([_+\w]*)<\/a>/){ print $1, "\n"; push(@releasesAU,$1); } } } close(FILE); my $row = 0; my $col=0; my $workbook = Spreadsheet::WriteExcel->new("test.xls"); my $worksheet = $workbook->add_worksheet(); $worksheet->write($row, $col, "Releases H"); $worksheet->write($row, $col+1, "Releases H+"); $row=2; foreach my $SOP (@releasesAU){ $worksheet->write($row, $col, $SOP); $row = $row+1; } $row =2; foreach my $SOP (@releasesAU3G){ $worksheet->write($row, $col+1, $SOP); $row = $row+1; } $workbook->close();


Comment on Re^2: www::mechanize executable
Download Code
Replies are listed 'Best First'.
Re^3: www::mechanize executable
by Corion (Pope) on Oct 18, 2012 at 16:56 UTC

    Have you inspected whether LWP::Protocol::https (and other dynamically loaded prerequisites of your script) are included in the generated executable?

      I have tried adding what you suggested use LWP::Protocol::https to my code, but nothing has changed How can I verify allthe automatically generated dependencies for my code? Maybe the problem is only that... thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (14)
As of 2015-07-31 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls