[Catalyst] RFC: new helper api

Devin Austin devin.austin at gmail.com
Sat Jun 6 03:20:19 GMT 2009


2009/6/5 Francesc Rom=E0 i Frigol=E9
<francesc.roma+catalyst at gmail.com<francesc.roma%2Bcatalyst at gmail.com>
>

>
> On Thu, Jun 4, 2009 at 4:51 AM, Devin Austin <devin.austin at gmail.com>wrot=
e:
>
>> Howdy all,
>>
>> I've put together an RFC for the new Catalyst::Helper API.
>> The body text is located below, but it is also available here in a pretty
>> formatted version:
>> http://www.codedright.net/2009/06/rfc-catalysthelper-api.html
>>
>
>
> Hi Devin,
>
> Thanks for working on this. I think you are on the right path :)
>
> This are two examples of things I think Catalyst::Helper should do, and it
> looks like it would, if your RFC where implemented:
>
> 1) It should be possible to create an application with catalyst version X
> and then run the catalyst helper again on catalyst version < X  (assuming=
 it
> doesn't use any feature of the newer version). Right now if an application
> has been created with Catalyst 5.8, running it with 5.7 is not just a mat=
ter
> of changing the line "use Catalyst::Runtime 5.80;"
>
> 2) It should be possible to incrementally change parts of the themes both
> for a specific application, or in general, for all the applications that =
I'm
> developing.
>
> For example, a possible approach could be, if I do catalyst.pl MyApp -the=
me
> cheesy, and I have a local theme configuration, let's say I have the files
> wrapper.tt and css/forms.css in the directory ~/.catalyst/themes/cheesy.
> In this case it should use the default catalyst configuration files for t=
he
> theme "cheesy" except for my local theme files. Also, if MyApp already
> exists, it should respect the local changes made to the theme for that
> application.
>
> I don't understand the part about generating DBIC schemas. Right now when=
 I
> need to change the schema because the sql has changed during development I
> do this:
>
> rm seminar.db
> sqlite3 seminar.db < seminar.sql
> ./script/seminar_create.pl model DB DBIC::Schema Seminar::Schema
> create=3Dstatic components=3DInflateColumn::FS  dbi:SQLite:seminar.db
>
> What are you proposing to change/improve?
>
> regards,
> Francesc
>
>
>
> _______________________________________________
> 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@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
I don't understand the part about generating DBIC schemas. Right now when I
need to change the schema because the sql has changed during development I
do this:

rm seminar.db
sqlite3 seminar.db < seminar.sql
./script/seminar_create.pl model DB DBIC::Schema Seminar::Schema
create=3Dstatic components=3DInflateColumn::FS  dbi:SQLite:seminar.db

What are you proposing to change/improve?

Basically, and forgive me for speaking the heretic "R" word, but something
more like the ruby on rails database migrations stuff.  Instead of having to
do all of that ^^^, something a little more sane like perl script/*schema.pl
update/drop $table/alter $blah, etc. Mainly allowing you to control your db
and schema from one script.  Note that this is obviously not the *exact*
implementation that will take form, but something along those lines.

I also like your idea about themes, that's a little more structured than I
was even thinking :-)

-- =

Devin Austin
http://www.codedright.net
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090605/8c182=
7d5/attachment.htm


More information about the Catalyst mailing list