ethrbunny has asked for the wisdom of the Perl Monks concerning the following question:
If I run the above code I get a 'segmentation fault' error. If I comment out the call to browser->request the error goes away. Its coming from DBI/DBH.#!/usr/bin/perl -w use strict; use DBI; use LWP::UserAgent; use HTTP::Request::Common; use XML::Simple; use Date::Manip; my $db_user = 'db_user'; my $db_pw = 'dbpw'; ## # DB connect my $dbh = DBI->connect('DBI:mysql:db_name:db_host', $db_user, $db_pw, + {PrintError => 1, AutoCommit => 1, RaiseError => 1} ); if (DBI::err) { die $DBI::errstr; } my $xml = new XML::Simple (KeyAttr=>[]); my $Browser = new LWP::UserAgent; push @{ $Browser->requests_redirectable }, 'POST'; my $URL = 'https://some_site_with_xml_data'; my %Fields; ##################note this code################# ## my $Page = $Browser->request(POST $URL,\%Fields); ## ################################################# # clean up $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBH - segmentation fault - out of memory?
by Corion (Patriarch) on Jan 24, 2008 at 13:21 UTC | |
by ethrbunny (Monk) on Jan 24, 2008 at 13:41 UTC | |
by ethrbunny (Monk) on Jan 24, 2008 at 13:46 UTC |