[Catalyst] Can't call method "run" on an undefined value

Ascii King tech at swattermatter.com
Thu Jun 11 20:02:05 GMT 2009


When I create and run a new Catalyst app form the CPAN tutorial, I get 
the following error:

Can't call method "run" on an undefined value at 
C:/Perl/site/lib/Catalyst.pm line 2094.

I am using Windows XP with MS SQL Server Express 2008 and a fresh 
install of Catalyst.
When I port over a catalyst app i havce created on my Linux box, it 
runs. The failure only occurs on apps I create on the Windows box. I am 
not very far along in the tutorial when I am trying to run this. I don't 
even have it connected to a database yet.

Also, I'm not sure if this is related or not, but the app I ported over 
can connect to the MS SQL database using ODBC  ( dbi:ODBC:ConnectName 
).  The app works fine and pulls and saves data properly. However, when 
I make a change to the database and need to reflect that change in 
Catalyst, I seem to be unable to connect. I run the following command, 
but it does not create the Schema files as I would expect.

script\myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static 
components=TimeStamp,EncodedColumn dbi:ODBC:MyAppDB user1 password1

This will create a lib\MyApp\Model\DB.pm file and a lib\MyApp\Schema.pm 
file. The schema.pm file has the proper load_namespaces instead of 
load_classes. However, I don't get any files in my lib\MyApp\Schema 
directory or lib\MyApp\Schema\Result directory.  I have no idea why. I 
originally thought it had something to do with my SQL Server 
permissions, but now I'm not sure. They might be the same problem.



More information about the Catalyst mailing list