Re: [Catalyst] using catalyst controllers from script

2017-04-30 Thread Marco Silva
Excerpts from Rajesh Kumar Mallah's message of 2017-04-29 16:11:09 -0400:
> 
> Hi ,
> 
> I have  application logic in controllers which i want to
> reuse from some non-http scripts.
Encapsulate it into your model.
> 
> Is it doable or should it be done at all ?
> 
> 
> I know models can easily be called from scripts , but
> my business logic lies in models and controllers.
As you foresee this is the right way to make things. Catalyst should be a thin
http layer to fat models.
> 
> sorry if it was a FAQ.
> 
> 
> Regds
> mallah.
> 

-- 
Marco Arthur @ (M)arco Creatives

___
List: Catalyst@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/


Re: [Catalyst] using catalyst controllers from script

2017-04-29 Thread Rajesh Kumar Mallah


I was able to use the controller methods that did not require
$c .

I just used the Module in the script and called the
methods in it and it worked.

Regds
mallah.

>
> Hi ,
>
> I have  application logic in controllers which i want to
> reuse from some non-http scripts.
>
> Is it doable or should it be done at all ?
>
>
> I know models can easily be called from scripts , but
> my business logic lies in models and controllers.
>
> sorry if it was a FAQ.
>
>
> Regds
> mallah.
>





___
List: Catalyst@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/