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

Mailing List Archive: Catalyst: Users

Catalyst::Plugin::AutoCRUD example not working?

 

 

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


snabb at epipe

Oct 6, 2011, 11:05 PM

Post #1 of 5 (224 views)
Permalink
Catalyst::Plugin::AutoCRUD example not working?

Hi,

First of all, I am total newbie with Catalyst (but not with Perl),
so please ignore any cluelessnes.

I got interested in Catalyst and in particular Catalyst::Plugin::AutoCRUD
and wanted to give it a try. I followed the instructions in the
"INSTANT DEMO APPLICATION" section of AutoCRUD manual page but can
not get it to work and do not have a clue how to troubleshoot.

The startup of the demo application is accompanied by some worrying
diagnostics outputs (see below).

If I try with old Catalyst (5.80032-1) and old Perl (v5.12.4) as
distributed by Ubuntu & Debian, I do get a server listening at port
3000 and can connect to it. I get the following message on the web
page:

> Welcome to AutoCRUD, an automagic web interface for databases
>
> The schema for database "Dbic" has been loaded, so please select a
> table by clicking on its label, below.

... but unfortunately there is nothing to click below that message.

The startup is accompanied with the following messages:

> Dynamic schema detected, will run in 0.04006 mode.
>
> Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT environment variable
> to disable this warning.
>
> Also consider setting 'use_namespaces => 1' if/when upgrading.
>
> See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for more
> details.
> ******************************* WARNING ***************************************
> * No sources found (did you forget to define your tables?) *
> * *
> * To turn off this warning, set the CMDS_NO_SOURCES environment variable. *
> *******************************************************************************
> [debug] Debug messages enabled
> [debug] Statistics enabled
> [warn] You are running an old script!
>
> Please update by running (this will overwrite existing files):
> catalyst.pl -force -scripts DemoApp
>
> or (this will not overwrite existing files):
> catalyst.pl -scripts DemoApp
>
> [debug] Loaded plugins:
> .----------------------------------------------------------------------------.
> | Catalyst::Plugin::AutoCRUD 1.112770 |
> | Catalyst::Plugin::ConfigLoader 0.30 |
> '----------------------------------------------------------------------------'
[..]

If I use current Perl with current Catalyst, I do not get a HTTP
server on port 3000. The application starts but I can not connect
to it. I get the following messages when starting:

> You are loading Catalyst::Engine::HTTP explicitly.
>
> This is almost certainally a bad idea, as Catalyst::Engine::HTTP
> has been removed in this version of Catalyst.
>
> Please update your application's scripts with:
>
> catalyst.pl -force -scripts MyApp
>
> to update your scripts to not do this.
>
> Dynamic schema detected, will run in 0.04006 mode.
>
> Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT environment variable
> to disable this warning.
>
> Also consider setting 'use_namespaces => 1' if/when upgrading.
>
> See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for more
> details.
> ******************************* WARNING ***************************************
> * No sources found (did you forget to define your tables?) *
> * *
> * To turn off this warning, set the CMDS_NO_SOURCES environment variable. *
> *******************************************************************************
> [debug] Debug messages enabled
> [debug] Statistics enabled
> [warn] You are running an old script!
>
> Please update by running (this will overwrite existing files):
> catalyst.pl -force -scripts DemoApp
>
> or (this will not overwrite existing files):
> catalyst.pl -scripts DemoApp
>
> [debug] Loaded plugins:
> .----------------------------------------------------------------------------.
> | Catalyst::Plugin::AutoCRUD 1.112770 |
> | Catalyst::Plugin::ConfigLoader 0.30 |
> '----------------------------------------------------------------------------'
[..]


Am I doing something wrong? Is AutoCRUD maintained? If not, is there
some replacement?

(Running "catalyst.pl -force -scripts DemoApp" as instructed in the
diagnostics output does not help, it does not seem like this is a
proper thing to do.)

--
Janne Snabb / EPIPE Communications
snabb [at] epipe - http://epipe.com/

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


2011 at denny

Oct 7, 2011, 2:28 AM

Post #2 of 5 (226 views)
Permalink
Re: Catalyst::Plugin::AutoCRUD example not working? [In reply to]

AutoCRUD is definitely maintained, and generally works very well.

'No sources defined' sounds to me like possibly your AutoCRUD config is wrong... I can't read the demo from here though, so can't help with specific advice, sorry.

--
Sent from my phone. Please excuse terseness, typos and top-posting.

Janne Snabb <snabb [at] epipe> wrote:

>Hi,
>
>First of all, I am total newbie with Catalyst (but not with Perl),
>so please ignore any cluelessnes.
>
>I got interested in Catalyst and in particular
>Catalyst::Plugin::AutoCRUD
>and wanted to give it a try. I followed the instructions in the
>"INSTANT DEMO APPLICATION" section of AutoCRUD manual page but can
>not get it to work and do not have a clue how to troubleshoot.
>
>The startup of the demo application is accompanied by some worrying
>diagnostics outputs (see below).
>
>If I try with old Catalyst (5.80032-1) and old Perl (v5.12.4) as
>distributed by Ubuntu & Debian, I do get a server listening at port
>3000 and can connect to it. I get the following message on the web
>page:
>
>> Welcome to AutoCRUD, an automagic web interface for databases
>>
>> The schema for database "Dbic" has been loaded, so please select a
>> table by clicking on its label, below.
>
>... but unfortunately there is nothing to click below that message.
>
>The startup is accompanied with the following messages:
>
>> Dynamic schema detected, will run in 0.04006 mode.
>>
>> Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT
>environment variable
>> to disable this warning.
>>
>> Also consider setting 'use_namespaces => 1' if/when upgrading.
>>
>> See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for
>more
>> details.
>> ******************************* WARNING
>***************************************
>> * No sources found (did you forget to define your tables?)
> *
>> *
> *
>> * To turn off this warning, set the CMDS_NO_SOURCES environment
>variable. *
>>
>*******************************************************************************
>> [debug] Debug messages enabled
>> [debug] Statistics enabled
>> [warn] You are running an old script!
>>
>> Please update by running (this will overwrite existing files):
>> catalyst.pl -force -scripts DemoApp
>>
>> or (this will not overwrite existing files):
>> catalyst.pl -scripts DemoApp
>>
>> [debug] Loaded plugins:
>>
>.----------------------------------------------------------------------------.
>> | Catalyst::Plugin::AutoCRUD 1.112770
> |
>> | Catalyst::Plugin::ConfigLoader 0.30
> |
>>
>'----------------------------------------------------------------------------'
>[..]
>
>If I use current Perl with current Catalyst, I do not get a HTTP
>server on port 3000. The application starts but I can not connect
>to it. I get the following messages when starting:
>
>> You are loading Catalyst::Engine::HTTP explicitly.
>>
>> This is almost certainally a bad idea, as Catalyst::Engine::HTTP
>> has been removed in this version of Catalyst.
>>
>> Please update your application's scripts with:
>>
>> catalyst.pl -force -scripts MyApp
>>
>> to update your scripts to not do this.
>>
>> Dynamic schema detected, will run in 0.04006 mode.
>>
>> Set the 'naming' attribute or the SCHEMA_LOADER_BACKCOMPAT
>environment variable
>> to disable this warning.
>>
>> Also consider setting 'use_namespaces => 1' if/when upgrading.
>>
>> See perldoc DBIx::Class::Schema::Loader::Manual::UpgradingFromV4 for
>more
>> details.
>> ******************************* WARNING
>***************************************
>> * No sources found (did you forget to define your tables?)
> *
>> *
> *
>> * To turn off this warning, set the CMDS_NO_SOURCES environment
>variable. *
>>
>*******************************************************************************
>> [debug] Debug messages enabled
>> [debug] Statistics enabled
>> [warn] You are running an old script!
>>
>> Please update by running (this will overwrite existing files):
>> catalyst.pl -force -scripts DemoApp
>>
>> or (this will not overwrite existing files):
>> catalyst.pl -scripts DemoApp
>>
>> [debug] Loaded plugins:
>>
>.----------------------------------------------------------------------------.
>> | Catalyst::Plugin::AutoCRUD 1.112770
> |
>> | Catalyst::Plugin::ConfigLoader 0.30
> |
>>
>'----------------------------------------------------------------------------'
>[..]
>
>
>Am I doing something wrong? Is AutoCRUD maintained? If not, is there
>some replacement?
>
>(Running "catalyst.pl -force -scripts DemoApp" as instructed in the
>diagnostics output does not help, it does not seem like this is a
>proper thing to do.)
>
>--
>Janne Snabb / EPIPE Communications
>snabb [at] epipe - http://epipe.com/
>
>_______________________________________________
>List: Catalyst [at] lists
>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>Searchable archive:
>http://www.mail-archive.com/catalyst [at] lists/
>Dev site: http://dev.catalyst.perl.org/


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


oliver at cpan

Oct 7, 2011, 3:16 AM

Post #3 of 5 (228 views)
Permalink
Re: Catalyst::Plugin::AutoCRUD example not working? [In reply to]

> AutoCRUD is definitely maintained, and generally works very well.
>
> 'No sources defined' sounds to me like possibly your AutoCRUD config is
> wrong... I can't read the demo from here though, so can't help with
> specific advice, sorry.

I released a new beta of AutoCRUD a couple of days ago, but it seems
metacpan.org doesn't scream "DEVELOPMENT RELEASE" at the user in the same
way search.cpan.org does - so I'm sorry if some users innocently
downloaded the 2.x TRIAL version, instead of the 1.x stable release.

The OP is probably quite right - AutoCRUD's demo app mightn't work, as
I've focused on getting the 1.x test suite to pass under 2.x (which it
does :-). AutoCRUD is developed on the shifting sands of many other
modules, and it may also be that changes elsewhere need to be handled.

If anyone wants to try the 2.x release of AutoCRUD - please do! There are
many new and oft-requested features now in place, including:

* Support for both composite and compound primary keys
* Tables can have multiple relations to the same table
* Tables can have relations to themselves
* Can set filters on has_many and many_to_many type relations
* URI query string can pre-set filter(s): cpac_filter.$col=$val
* Support for tables with no primary key (possibly read-only)
* Support for columns with names that are not Perl identifiers
* Support for Views (in DBIx::Class, both virtual and non-virtual)
* DBIx::Class proxy columns are displayed and can be edited
* Support custom accessor names on DBIx::Class columns
* Auto-increment columns are not displayed on the Add/Edit form

The guts have also been rewritten to decouple from DBIx::Class, and hence
support other table/column-like storage backends. What remains is for me
to document the API so that this can be used.

p.s. if you do encounter an issue - by all means try this mail list but
also raise a ticket at rt.cpan.org as then I will keep track of it, and be
more likely to take a look on a rainy Sunday afternoon :-)

regards,
oliver.



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


jul.gil at gmail

Oct 7, 2011, 8:11 AM

Post #4 of 5 (227 views)
Permalink
Re: Catalyst::Plugin::AutoCRUD example not working? [In reply to]

2011/10/7 Oliver Gorwits <oliver [at] cpan>:
>> AutoCRUD is definitely maintained, and generally works very well.
>>
>> 'No sources defined' sounds to me like possibly your AutoCRUD config is
>> wrong... I can't read the demo from here though, so can't help with
>> specific advice, sorry.
>
> I released a new beta of AutoCRUD a couple of days ago, but it seems
> metacpan.org doesn't scream "DEVELOPMENT RELEASE" at the user in the same
> way search.cpan.org does - so I'm sorry if some users innocently
> downloaded the 2.x TRIAL version, instead of the 1.x stable release.
>
> The OP is probably quite right - AutoCRUD's demo app mightn't work, as
> I've focused on getting the 1.x test suite to pass under 2.x (which it
> does :-). AutoCRUD is developed on the shifting sands of many other
> modules, and it may also be that changes elsewhere need to be handled.
>
> If anyone wants to try the 2.x release of AutoCRUD - please do!

In order to ease the solving of my utf-8 bug I have developed a poc ;
you can download it at http://gilles.tk/TestUTF8-0.01.tar.gz
It's a simple Catalyst App, with a sqlite3 database with only one
table and a text column, with utf-8 content.

I tried to run it with the 2.x Trial (same code, same config, only
changing the AutoCRUD modules), and I have the following error :

Caught exception in TestUTF8::Controller::AutoCRUD::Root->err_message
"Use of uninitialized value in exists at
/usr/local/share/perl/5.10.1/Catalyst/Plugin/AutoCRUD/Controller/Root.pm
line 158."


--
Julien Gilles.

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


oliver at cpan

Oct 9, 2011, 7:33 AM

Post #5 of 5 (213 views)
Permalink
Re: Catalyst::Plugin::AutoCRUD example not working? [In reply to]

On 07/10/2011 16:11, jul.gil [at] gmail wrote:
> I tried to run it with the 2.x Trial (same code, same config, only
> changing the AutoCRUD modules), and I have the following error :
>
> Caught exception in TestUTF8::Controller::AutoCRUD::Root->err_message
> "Use of uninitialized value in exists at
> /usr/local/share/perl/5.10.1/Catalyst/Plugin/AutoCRUD/Controller/Root.pm
> line 158."

The config with the app isn't right, which is why AutoCRUD exploded.
Sure, it shouldn't do that, so I have another thing to fix :)

But to get the app running, comment out the Model::AutoCRUD::DBIC config
key entirely. You already provide DB connection info within the DB.pm
Model. This is Scenario 1. from the documentation.

(of course if you want to customize AutoCRUD then the key needs to be
there only without the connection/schema info)

regards,
oliver.

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

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


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.