"new_group_from_values" is not exported by the DBIx::SQLEngine::Criteria module Can't continue after import errors at /home/terry/perl/share/perl/5.8.7/DBIx/SQLEngine/RecordSet/Set.pm line 318 BEGIN failed--compilation aborted at /home/terry/perl/share/perl/5.8.7/DBIx/SQLEngine/RecordSet/Set.pm line 318. Compilation failed in require at /home/terry/perl/share/perl/5.8.7/DBIx/SQLEngine/Record/Table.pm line 64. Compilation failed in require at /home/terry/perl/share/perl/5.8.7/Class/MixinFactory/Factory.pm line 55. 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.
... 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 work.
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 distribution.
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:
In reply to runtime load of DBIx::SQLEngine modules via CGI::Prototype::PathInfo fails but static cases work fine by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |