logo       

Problem with Catalyst and Rose::DB: msg#00066

lang.perl.modules.dbi.rose-db-object

Subject: Problem with Catalyst and Rose::DB

I'm having some issues using Rose::DB from within the catalyst
framework.

I load the modules using a PerlSwitches directive in
my /etc/apache2/apache.conf:

PerlSwitches -I/var/www/Dealermade/lib/Dealermade/M

My Rose::DB structure is simple (I've watered it down to get to the
problem)

ecarroll@AMD64:/var/www/Dealermade/lib/Dealermade/M$ find . -name '*pm'
./Default.pm
./Import/Import.pm
./Import/Manager.pm

Now the problem is kind of easy, with a script test script as follows,
placed in /var/www/Dealermade/lib/Dealermade/M, that consists of:

use Data::Dumper;
use Import::Import;
foreach my $import ( @{ Import::Manager->get_imports() } ) {
print $import->file;
}

Rose would work as expected, and it prints out all of the files listed
in the imports table, now when I try to start the Catalyst server, I
get:

ecarroll@AMD64:/var/www/Dealermade$ perl script/dealermade_server.pl
Subroutine init_db redefined
at /var/www/Dealermade/script/../lib/Dealermade/M/Import/Import.pm line
19.
Couldn't load "Dealermade::M::Import::Import", "Cannot create method
Import::Import::dns - method already exists
at /usr/local/share/perl/5.8.7/Rose/DB/Object/Metadata/MethodMaker.pm
line 420
Compilation failed in require
at /usr/share/perl5/Module/Pluggable/Fast.pm line 82.
" at /usr/share/perl5/Module/Pluggable/Fast.pm line 84.
Compilation failed in require at script/dealermade_server.pl line 49.

Thanks for the help, Any ideas?

Is this a namespace problem?

--
Evan Carroll <evan-NNRANs7TgWWlQ9BUahrlcQ@xxxxxxxxxxxxxxxx>



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise