Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Can't call method "run" on an undefined value

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


tech at swattermatter

Jun 11, 2009, 1:02 PM

Post #1 of 3 (372 views)
Permalink
Can't call method "run" on an undefined value

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.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


ijw at cack

Jun 11, 2009, 10:14 PM

Post #2 of 3 (341 views)
Permalink
Re: Can't call method "run" on an undefined value [In reply to]

2009/6/11 Ascii King <tech[at]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.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


tech at swattermatter

Jun 12, 2009, 6:37 AM

Post #3 of 3 (335 views)
Permalink
Re: Can't call method "run" on an undefined value [In reply to]

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[at]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.
>
>

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.