FAQ
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.

Search Discussions

  • Ian Wells at Jun 12, 2009 at 5:14 am

    2009/6/11 Ascii King <tech@swattermatter.com>:
    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.
    Just had this myself. Do you have a call to __PACKAGE__->setup in
    lib/MyApp.pm ? In an autocreated application it should be there, but
    this is the error you get if you remove it.

    --
    Ian.
  • Ascii King at Jun 12, 2009 at 1:37 pm
    That solved it, thanks! I had replaced the wrong line in the
    lib\MyApp.pm when following the tutorial.

    Ian Wells wrote:
    2009/6/11 Ascii King <tech@swattermatter.com>:
    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.
    Just had this myself. Do you have a call to __PACKAGE__->setup in
    lib/MyApp.pm ? In an autocreated application it should be there, but
    this is the error you get if you remove it.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 11, '09 at 8:02p
activeJun 12, '09 at 1:37p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Ascii King: 2 posts Ian Wells: 1 post

People

Translate

site design / logo © 2022 Grokbase