-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, Oct 02, 2001 at 05:01:45PM +0100, Marc Beyer wrote:
> 'Can't locate object method "prepare" via package
> "DBI::db=HASH(0x81d4d0c)"
>
> my $obj=FIGGED::element->new("$$param{data}","$dbh");
^ ^ ^ ^
Your problem is the quotes, which is converting the object reference into a
string and dropping all the magic that marks the variable as an object.
As a general Perl rule, if you don't need quotes, don't use them. A scalar is a
scalar whether it's in quotes or not, so you only need them if you're
interpolating a variable into a larger literal string (IOW they're not
necessary on the first parameter either). And if you're not interpolating (as
in the db handle), you need to leave them off so the variable gets passed by
reference and retains all its magic.
- --
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBO7yk1QOGqGs0PadnEQKsjgCfcZg3PBFD7BCsdro6sQQrtvCf/TUAmgMG
15ZAWVsmJKaBYno34b4mHmLw
=2QuT
-----END PGP SIGNATURE-----