Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Does it make sense to put this into a module?sub handle_error{ my $msg = shift ||' '; my $dbh = shift ||' '; my $sth = shift ||' '; #html::template - handle_error.tmpl my $tem = HTML::Template->new(filename => "handle_error.tmpl"); $tem -> param(message => $msg); print $tem->output; #finish the state handle and disconnect, if necessary $sth->finish() if $sth; $dbh->disconnect() if $dbh; exit 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing a subroutine to a module
by CountZero (Bishop) on Feb 10, 2005 at 12:31 UTC | |
|
Re: Changing a subroutine to a module
by boboson (Monk) on Feb 10, 2005 at 13:18 UTC | |
|
Re: Changing a subroutine to a module
by cog (Parson) on Feb 10, 2005 at 10:37 UTC | |
|
Re: Changing a subroutine to a module
by weedom (Acolyte) on Feb 10, 2005 at 11:00 UTC | |
|
Re: Changing a subroutine to a module
by hok_si_la (Curate) on Feb 10, 2005 at 15:00 UTC | |
|
Re: Changing a subroutine to a module
by ikegami (Patriarch) on Feb 10, 2005 at 18:08 UTC | |
|
Re: Changing a subroutine to a module
by cbrandtbuffalo (Deacon) on Feb 10, 2005 at 18:39 UTC | |
|
Re: Changing a subroutine to a module
by TomDLux (Vicar) on Feb 10, 2005 at 19:51 UTC |