EXPORT and EXPORT_OK

2001-07-05 Thread JCervoni
Is it possible to change @EXPORT during runtime? I'm trying to import subroutines in the following manner: - I have a file called DBLib.pm which imports a file "DefaultLib.pm" via a "use". DBLib.pm ### package DBLib.pm use strict ; require Exporter ; use DefaultLib ; use vars q

Redefining a Subroutine

2001-07-05 Thread JCervoni
I need to redefine a subroutine from one package to a subroutine from another. This code works and does what I want it to, however I need to write it so it isn't hard coded. The posible necessary escapes, evals, single quotes and double quotes make me woozy. # WORKS # und

Re: PDF's on the fly...

2001-07-20 Thread JCervoni
> Would it be at all possible to create PDF files on the fly using perl? I'm > thinking are there any modules which would do the job and does anyone have > any experience in using them? > Any pointers would be greatly appreciated. > I'm running the stuff on solaris 5.6 if that makes a differ

Re: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
It appears that the only kind of assertion test I could do would be to test $dbh like this if ( !defined($dbh) || $dbh eq '' ) { print "dbh is invalid\n" ; exit 1 } Jeff > Can I test for the existence of a method without actually calling it? > > Basically what I'm trying to

Re: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
I wrote a module called DBIv that does a 'use DBI ; '. These are the functions that I defined. This module was written with the intention of providing 2 things: - a very simple interface - database independence -- Connection Functions:

Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
Can I test for the existence of a method without actually calling it? Basically what I'm trying to do is to verify that $dbh is still a valid handle. I want to use this as an assertion test at the start of a function. # verify that the $dbh is valid if ( !defined($dbh->disconnect() ) ) {

RE: Valid DB Handle Assertion Test

2001-08-02 Thread JCervoni
> Another approach is to wrap the disconnect in eval, which lets you capture > the error rather than having it stop your program: > > eval { $dbh->disconnect(); }; > > If $dbh is not a database handle, the relevant error message will be in $@. > > perldoc -f eval > > I think the eval method i