--===============0794531892==
Content-Type: multipart/alternative;
boundary="----=_Part_8764_19708493.1168460271930"
------=_Part_8764_19708493.1168460271930
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I sincerely apologise for posting such a simple issue, but (presumably as a
result of premature senility or insufficient sleep) I cannot see the
solution to this simple problem:
use strict;
use warnings;
package Trendex::MyDBI;
use base 'Class::DBI::mysql';
{
__PACKAGE__->set_db('Main', 'dbi:mysql:test', 'user', 'pswd',
{AutoCommit=>0});
}
package Trendex::Consumer;
use base 'Trendex::MyDBI';
{
__PACKAGE__->set_up_table('Consumer');
}
package showError;
use base 'Trendex::Consumer';
{
__PACKAGE__->set( LASTNAME => 'Smith' );
}
results in the error
Can't use string ("showError") as a HASH ref while "strict refs" in use at
E:/Perl/site/lib/Class/DBI.pm line 466
(This is Class::DBI 3.0.14 and the line that triggers the error is
for my $col (keys %$vals) { $self->{__Changed}{$col}++; } )
What is the simple solution?
------=_Part_8764_19708493.1168460271930
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I sincerely apologise for posting such a simple issue, but (presumably as a result of premature senility or insufficient sleep) I cannot see the solution to this simple problem:<br><br>use strict;<br>use warnings;<br><br>package Trendex::MyDBI;
<br>use base 'Class::DBI::mysql';<br>{<br> __PACKAGE__->set_db('Main', 'dbi:mysql:test', 'user', 'pswd', {AutoCommit=>0});<br>}<br>package Trendex::Consumer;<br>use base 'Trendex::MyDBI';
<br>{<br> __PACKAGE__->set_up_table('Consumer');<br>}<br>package showError;<br>use base 'Trendex::Consumer';<br>{<br> __PACKAGE__->set( LASTNAME => 'Smith' );<br>}<br><br>results in the error
<br><br>Can't use string ("showError") as a HASH ref while "strict refs" in use at E:/Perl/site/lib/Class/DBI.pm line 466<br><br>(This is Class::DBI 3.0.14 and the line that triggers the error is<br>
for my $col (keys %$vals) { $self->{__Changed}{$col}++; } )<br><br>What is the simple solution?<br>
------=_Part_8764_19708493.1168460271930--
--===============0794531892==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0794531892==--
