vaevictus has asked for the wisdom of the Perl Monks concerning the following question:
Code below *sometimes* causes segfaults. Not perl crashes... works fine as CGI or commandline...
#!/usr/bin/perl -wT use strict; use CGI qw/:standard/; use lib "/home/vae/perl"; print header; execute(); info(); print end_html; sub execute { use strict; use CGI qw/:standard/; print h1("hi"); } sub info { use strict; use CGI qw/:standard/; use DBI; my $DSN= "DBI:mysql:vaevictus"; my $user= "vaevictus"; my $pass= ""; #censored. :) my $dbh = DBI->connect($DSN,$user,$pass) or print h1('nope'); print h1("hi"); $dbh->disconnect; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: uh... segfault. mod_perl, Apache::DBI and other atrocities.
by chromatic (Archbishop) on Jul 05, 2001 at 01:29 UTC | |
by vaevictus (Pilgrim) on Jul 05, 2001 at 03:09 UTC | |
by blakem (Monsignor) on Jul 05, 2001 at 22:52 UTC | |
Re: uh... segfault. mod_perl, Apache::DBI and other atrocities.
by toma (Vicar) on Jul 05, 2001 at 04:12 UTC | |
Re: uh... segfault. mod_perl, Apache::DBI and other atrocities.
by vaevictus (Pilgrim) on Jul 05, 2001 at 01:02 UTC | |
Re: uh... segfault. mod_perl, Apache::DBI and other atrocities.
by vaevictus (Pilgrim) on Jul 06, 2001 at 03:22 UTC |
Back to
Seekers of Perl Wisdom