Help for this page

Select Code to Download


  1. or download this
    package TestModule;
    require DBI;
    ...
        
        bless $obj, $self;
    }
    
  2. or download this
    use Test::More tests => 9;
    # ... snipped setup of $obj = new & etc.
    ...
    
    # this fails:
    isnt  ($sth, undef, 'prepare creates statement handle');
    
  3. or download this
    sub AUTOLOAD {
        my $op = $AUTOLOAD;
    ...
            eval "sub $op { return shift->error('Cannot autoload $op'); }"
    +;
        }
    }
    
  4. or download this
    # sets up autoload subs that 'inherit' DBI's DBH methods
    sub AUTOLOAD {
    ...
            return $self->error("Cannot autoload $op");
        }
    }