[CDBI] fail to use Class::DBI methods when using perl 5.6.1

"Shani Ben Avraham" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Hi,

I developed code using Class::DBI on perl 5.8.7 and moved the code (due to
some constraint) to perl 5.6.1.
When using methods of Class::DBI I get errors (nevertheless set_sql method
works fine).

For example when using method find_or_create on one of my tables I get the
following error:

......

 'FIREBALL::DB::Local::BRANCHES can\'t SELECT Class::DBI::Column=H...',
'ignore_class', 'ARRAY(0xa09c560)', 'ignore_package', 'ARRAY(0xa09c59c)')
called at /opt/AIGmaster-10/prod/fireball-1/lib/FIREBALL/DB/Local.pm line 43
<-->  FIREBALL::DB::Local::_croak('FIREBALL::DB::Local::BRANCHES',
'FIREBALL::DB::Local::BRANCHES can\'t SELECT Class::DBI::Column=H...',
'err', '') called at /usr/lib/perl5/site_perl/5.6.1/Class/DBI.pm line 1135
<-->    Class::DBI::sth_to_objects('FIREBALL::DB::Local::BRANCHES',
'DBIx::ContextualFetch::st=HASH(0x90e8ae4)', 'ARRAY(0x815140c)') called at
/usr/lib/perl5/site_perl/5.6.1/Class/DBI/Search/Basic.pm line 169 <-->
Class::DBI::Search::Basic::run_search('Class::DBI::Search::Basic=HASH(0xa09a810)')
called at /usr/lib/perl5/site_perl/5.6.1/Class/DBI.pm line 1086 <-->
Class::DBI::__ANON__('FIREBALL::DB::Local::BRANCHES', 'HASH(0xa065768)')
called at /usr/lib/perl5/site_perl/5.6.1/Class/DBI.pm line 416 <-->
Class::DBI::find_or_create('FIREBALL::DB::Local::BRANCHES',
'HASH(0xa065768)') called at get_auto_information.asp line 112 <-->
AIG::ASP::__ASP__opt_AIGmaster_10_prod_fireball_1_web_server_scripts_get_auto_information_aspx452fd6b3ec5a14ac1b9256300544e8ec()
called at /usr/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1558 <-->  eval
{...} called at /usr/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1558
<-->        Apache::ASP::Execute('Apache::ASP=HASH(0xa02759c)') called at
/usr/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 170 <-->
Apache::ASP::handler('Apache=SCALAR(0xa027524)') called at /dev/null line 0
<-->        eval {...} called at /dev/null line 0 <--> ,
/usr/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1560
[Thu May 11 21:56:31 2006] [error] Uncaught exception from user code:
        Modification of a read-only value attempted at
/usr/lib/perl5/site_perl/5.6.1/DBIx/ContextualFetch.pm line 53.
        eval {...} called at /dev/null line 0

....

The trace (1) on the same code gave me the following:

.......

 T  <- ping= 1 at DBI.pm line 312
 T  <- prepare_cached('SELECT Class::DBI::Column=HASH(0x86e8d00)
FROM   CVS_BRANCHES_TBL
WHERE  cvs_branch_name = ?
')= ( DBIx::ContextualFetch::st=HASH(0x90e8ae4) ) [1 items] at DBI.pm line
381
 T  <- FETCH('Active')= '' at DBI.pm line 1131
 T  <- FETCH('Taint')= 1 at ContextualFetch.pm line 50
    <- STORE('Taint' 0)= 1 at ContextualFetch.pm line 51
    !! ERROR: 1064 'You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near '::DBI::Column=HASH(0x86e8d00)
FROM   CVS_BRANCHES_TBL
WHERE  cvs_branch_name = '' at line 1' (err#0)
    <- execute('AIG_DEV')= undef at ContextualFetch.pm line 52
    -> HandleError on DBIx::ContextualFetch::st=HASH(0xa09a9fc) via
CODE(0x818337c) (undef)
       ERROR: 4 'statement contains no result' (err#0)
    <> FETCH('Statement')= 'SELECT Class::DBI::Column=HASH(0x86e8d00)
FROM   CVS_BRANCHES_TBL
WHERE  cvs_branch_name = ?
' ('Statement' from cache) at DBI.pm line 1135
    <- HandleError= undef (UNKNOWN)
..........

If someone knows anything that might help please inform me,

Regards,

Shani

_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
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.