Skip to content

Instantly share code, notes, and snippets.

@keedi
Created May 12, 2011 12:52
Show Gist options
  • Save keedi/968434 to your computer and use it in GitHub Desktop.
Save keedi/968434 to your computer and use it in GitHub Desktop.
bug-report-fey-loader-mysql
When executing Fey::ORM based script following error is occurred:
> scro-mc/DCF-Web$ <develop> ./run-psgi.pl
> Watching lib dcf_web.yml script/lib script/dcf_web.psgi for file updates.
> Error while loading script/dcf_web.psgi: Couldn't instantiate component "DCF::Web::Model::API", "Can't locate object method "statistics_info" via package "DBD::mysql::db::SUPER" at /home/askdna/perl5/perlbrew/perls/perl-5.12.1/lib/site_perl/5.12.1/i686-linux-thread-multi/DBD/mysql.pm line 764."Compilation failed in require at script/dcf_web.psgi line 4.
> BEGIN failed--compilation aborted at script/dcf_web.psgi line 4.
> ^C
>
> scro-mc/DCF-Web$ <develop>
DBD::mysql 4.019 Changelog:
> 2011-05-08 Patrick Galbraith <[email protected]> Rob Hoelz <[email protected]> (4.019)
> * Asynchronous support added by Rob Hoelz - Thanks!
> * Amiri Barksdale - Enable environment variables for installation options, add
> docs to POD - Thanks!
> * Pedro Melo - fix to change sv_undef to PL_sv_undef from 4.018 - Thanks!
in DBD::mysql module source code:
> BEGIN {
> my @needs_async_check = qw/data_sources statistics_info quote_identifier begin_work/;
>
> foreach my $method (@needs_async_check) {
> no strict 'refs';
>
> my $super = "SUPER::$method";
> *$method = sub {
> my $h = shift;
> return unless $h->func('_async_check');
> return $h->$super(@_);
> };
> }
> }
I guess above async check code is troubled with Fey::Loader::mysql's DBD::mysql::Fixup code:
> package # hide from PAUSE
> DBD::mysql::Fixup;
>
> BEGIN {
> unless ( defined &DBD::mysql::db::statistics_info ) {
> *DBD::mysql::db::statistics_info = \&_statistics_info;
> }
> }
>
> sub _statistics_info {
> my ( $dbh, $catalog, $schema, $table, $unique_only ) = @_;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment