networknerd has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone have ConfigLocal.pm

Used on win32 machines with activestate perl sending info to my linux firewall.

perl2exe is causing me grief I have found all the files that it asked for except this one.

I need to remotely send information to my firewall, I don't want students finding and messing with the scripts so it has to be compiled.

My Perl script works perfectly but it won't work without this file, tried exlude command but that didn't work either (It elcuded the file which compiled and then dosn't work.

Proff of concept scrip below works but exe won't post.

I

#!/usr/bin/perl #perl2exe_include HTTP::Request::Common #perl2exe_include LWP::UserAgent # Script to emulate a browser for posting to a # CGI program with method="POST". # Specify the URL of the page to post to. # my $URLtoPostTo = "http://flowto.info/cgi-bin/Dump.cgi"; my $URLtoPostTo = "https://10.10.10.10:5445/cgi-bin/lon.cgi"; # Specify the information to post, the form field name on # the left of the => symbol and the value on the right. my %Fields = ( "name" => "nivend", "test" => "testdata", "ip" => "10.10.10.171" ); # As seen above, "@" must be escaped when quoted. # If you want to specify a browser name, # do so between the quotation marks. # Otherwise, nothing between the quotes. my $BrowserName = "This Be Mine"; # It's a good habit to always use the strict module. use strict; # Modules with routines for making the browser. use LWP::UserAgent; #Next Module does the post request use HTTP::Request::Common; # Create the browser that will post the information. my $Browser = new LWP::UserAgent; # Insert the browser name, if specified. if($BrowserName) { $Browser->agent($BrowserName); } # Post the information to the CGI program. my $Page = $Browser->request(POST $URLtoPostTo,\%Fields); # Print the returned page (or an error message). print "Content-type: text/html\n\n\n"; if ($Page->is_success) { print $Page->content; } else { print $Page->message; } # end of script

Replies are listed 'Best First'.
Re: Encode:ConfigLocal Missing
by marto (Cardinal) on Jan 02, 2010 at 16:46 UTC

    Thanks for ignoring the instructions for formatting your post correctly ;)

    I assume you copied and pasted your script from here? If, as you claim, the perl script works fine then this is probably a Perl2Exe bug. Searching google may find similar problems, and possible explanations. I use pp to package apps to executables, and never have such issues.

    Prior to posting in future please read and understand How do I post a question effectively? and Writeup Formatting Tips.

Re: Encode:ConfigLocal Missing
by syphilis (Archbishop) on Jan 03, 2010 at 11:49 UTC
    Does anyone have ConfigLocal.pm

    Clutching at straws .... when I search my ActivePerl installation for files matching /ConfigLocal/i the only hit I get is for perl\lib\Encode\ConfigLocal_PM.e2x. Could that be relevant to your problem ?

    Cheers,
    Rob
      Hi,

      I too face the same problem. I think that the problem here is that the post install steps are not clear, there is more to do to setup this module ( Encode ).

      The code in the latest version of Encode.pm will ignore this file if it's not there.

      I tried to also run, as some people have suggested, enc2xs but get the following error.

      $ ../../../perl5.8/script/enc2xs -C require Encode; ... require Encode::CN::HZ; Warning: something's wrong at ../../../perl5.8/script/enc2xs line 1017 +. /scratch/rkazak/perl5.8/lib/5.8.9/Encode Generating /scratch/rkazak/perl5.8/lib/5.8.9/IA64.ARCHREV_0-thread-mul +ti-LP64/Encode/ConfigLocal.pm... $

      This generates a minimal file, which could be used I guess. I would like to know what the e2x files are for, they look like templates for setting up encodings? Maybe this is mostly a documentation issue?