I have an issue with import and inheritance that I cannot figure
out. When a certain module of mine is loaded at runtime, it forces a
chain of requires through the DBIx::SQLEngine distribution, leading to
this error:

"new_group_from_values" is not exported by the
DBIx::SQLEngine::Criteria module
Can't continue after import errors at
line 318
BEGIN failed--compilation aborted at
line 318.
Compilation failed in require at
/home/terry/perl/share/perl/5.8.7/DBIx/SQLEngine/Record/Table.pm line
Compilation failed in require at
/home/terry/perl/share/perl/5.8.7/Class/MixinFactory/Factory.pm line
Compilation failed in require at
/var/www/terry/metaperl.org/Guestbook/App/sign_commit.pm line 7.
BEGIN failed--compilation aborted at
/var/www/terry/metaperl.org/Guestbook/App/sign_commit.pm line 7.
Compilation failed in require at
/var/www/terry/metaperl.org/Guestbook/App.pm line 17.
BEGIN failed--compilation aborted at
/var/www/terry/metaperl.org/Guestbook/App.pm line 17.
Compilation failed in require at Guestbook.cgi line 32.
BEGIN failed--compilation aborted at Guestbook.cgi line 32.
[Fri Sep  9 01:25:56 2005] [error] [client] Premature
end of script headers:

... and if you look at the file Criteria.pm you would not be surprised
to see this import error because no such sub exists in this file:


However, I can run 2 separate static small scripts which emulate what
is happening during the above chain of failed requires and they all

First, a script which loads Guestbook::Model::entry (the module whose
require from Guestbook::App::sign_commit creates the error chain)
and does a commit to database... it does the commit perfectly.

entry.pl and entry.pm are here:


In other words, even though it loads Guestbook::Model::entry, it does
not fail when loading the other modules in the DBIx::SQLEngine

Now, the last thing that happens before the "not exported" error is
that Record/Table.pm does a require  DBIx::SQLEngine::RecordSet::Set,
so I wrote a script which only does that and it runs just fine:


So, the question becomes: why is it when CGI::Prototype::PathInfo does
a dynamic require of Guestbook::App::sign_commit and then
Guestbook::App::sign_commit does a use Guestbook::Model::entry that
the above chain of errors is thrown?

You can view PathInfo.pm here:


        Carter's Compass: I know I'm on the right track when,
           by deleting something, I'm adding functionality.

SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
cgi-prototype-users mailing list

Reply via email to