Skip Menu |

This queue is for tickets about the Jifty CPAN distribution.

Report information
The Basics
Id: 48710
Status: open
Priority: 0/
Queue: Jifty

People
Owner: Nobody in particular
Requestors: hui_nan [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: `jifty [model|action] -- name A::B::C` must create lib/$app/[Model|Action]/A/B/C.pm
The command jifty [model|action] --name AA::BB::CC creates lib/$app/[Model|Action]/AA::BB::CC.pm instead of lib/$app/[Model|Action]/AA/BB/CC.pm This feature would be nice to have for large applications. Patches to Jifty::Script::[Model|Action].pm are attached.
Subject: Model.diff
*** oldModel.pm 2009-05-01 07:16:31.000000000 +0400 --- newModel.pm 2009-08-14 17:26:02.000000000 +0400 *************** *** 157,164 **** EOT ! $self->_write("$root/lib/$appclass_path/Model/$model.pm" => $modelFile, ! "$root/t/00-model-$model.t" => $testFile, ); } --- 157,166 ---- EOT ! my $path = $model; ! $path =~ s/::/\//g; ! $self->_write("$root/lib/$appclass_path/Model/$path.pm" => $modelFile, ! "$root/t/00-model-$path.t" => $testFile, ); }
Subject: Action.diff
*** oldAction.pm 2009-05-01 07:16:31.000000000 +0400 --- newAction.pm 2009-08-14 17:29:01.000000000 +0400 *************** *** 157,165 **** use_ok('@{[$appclass]}::Action::@{[$action]}'); EOT ! $self->_write("$root/lib/$appclass_path/Action/$action.pm" => $actionFile, ! "$root/t/00-action-$action.t" => $testFile, ); } --- 157,167 ---- use_ok('@{[$appclass]}::Action::@{[$action]}'); EOT + my $path = $action; + $path =~ s/::/\//g; ! $self->_write("$root/lib/$appclass_path/Action/$path.pm" => $actionFile, ! "$root/t/00-action-$path.t" => $testFile, ); }
Птн. Авг. 14 09:50:05 2009, crusoe писал: Show quoted text
> The command > jifty [model|action] --name AA::BB::CC > creates lib/$app/[Model|Action]/AA::BB::CC.pm > instead of lib/$app/[Model|Action]/AA/BB/CC.pm > > This feature would be nice to have for large applications. > > Patches to Jifty::Script::[Model|Action].pm are attached. >
Looks like Jifty::ClassLoader is to be patched too.
Subject: Re: [rt.cpan.org #48710] `jifty [model|action] -- name A::B::C` must create lib/$app/[Model|Action]/A/B/C.pm
Date: Sat, 15 Aug 2009 23:13:01 +0400
To: bug-Jifty [...] rt.cpan.org
From: Ruslan Zakirov <ruslan.zakirov [...] gmail.com>
Hello Andrei, Patching class loader may be tricky. What I mean is choosing proper way to patch it. If you have model App::Model::A::B then it's not always true that you want it to be standalone model, but may be subclass of App::Model::A and share the same table with super class. It's just matter of choosing right defaults. On Sat, Aug 15, 2009 at 5:52 PM, Andrei V. Toutoukine via RT<bug-Jifty@rt.cpan.org> wrote: Show quoted text
>       Queue: Jifty >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48710 > > > Птн. Авг. 14 09:50:05 2009, crusoe писал:
>> The command >> jifty [model|action] --name AA::BB::CC >> creates lib/$app/[Model|Action]/AA::BB::CC.pm >> instead of lib/$app/[Model|Action]/AA/BB/CC.pm >> >> This feature would be nice to have for large applications. >> >> Patches to Jifty::Script::[Model|Action].pm are attached. >>
> > Looks like Jifty::ClassLoader is to be patched too. > >
-- Best regards, Ruslan.