in reply to Returning columns with SQL::Statement error

Hello LalakisOeisagwmenos,

Welcome to the Monastery. I do not run SQL on my OS but the error seems to be coming from line 17:

printf "Columns %s\n",join( ',', map {$_->name} $stmt->col +umn_defs() );

Can you check if this method name is contained in?

print Dumper $stmt->column_defs();

Always always use strict and warnings.

Looking forward to your update, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Returning columns with SQL::Statement error
by LalakisOeisagwmenos (Novice) on Jan 22, 2018 at 11:09 UTC
    Thank you for your reply. I have done so before to check my self too. It seems though that this method don't exist.
    But either don't exist value map{$_->value()} or trying to access it as a hash value map{$_->{value}} either quoted or not. It seems that the self is not blessed when the columns object is created.
    $VAR1 = [ { 'type' => 'column', 'fullorg' => 'a', 'value' => 'a' }, { 'fullorg' => 'aa', 'type' => 'column', 'value' => 'aa' } ];