Re: Fwd: SQL::Statement (SQL-Statement-1.402_002)

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <20121219172148.GA4000@Dago>
> Date: 	Wed, 19 Dec 2012 15:53:31 +0100
> From: 	Thomas Binder <[email protected]>

> use SQL::Statement;
> my $sql    = "SELECT a FROM b JOIN c WHERE c=? AND e=7 ORDER BY f DESC
> LIMIT 5,2";
> my $parser = SQL::Parser->new();
> $parser->{RaiseError}=1;
> $parser->{PrintError}=0;
> …
> printf "Offset              %s\n",$stmt->offset();
> printf "Columns             %s\n",join( ',', map {$_->name}
> $stmt->column_defs() );

The second before last line misses the terminal semicolon.
Hence the error:

> Can't call method "name" on unblessed reference at test.pl
> <http://test.pl> line 14.

Frohe Feiertage …

Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.