Mailing List Archive

CLI execution
Hi,



I’m working on an information site for my company using Catalyst, MySQL and
am Windows. I’m looking for guidance on how to produce some reports. I have
a DB which I’m querying for general content/data, but for some reports the
information is only available via a CLI, so the question is how should I
query the command line?



I’m guessing this should be done as part the model layer but I’m unsure of
what module to use, google just directs me to how to start the dev server
and I didn’t see anything on CPAN’s list of Catalyst Models. Any help would
be appreciated.



This is all assuming I don’t just use back ticks or system, which I assume
is a bad idea as I don’t want the user waiting 30 seconds for a page to
load.

Or I could just load the page and execute the report via a AJAX call back
to Catalyst using the a basic system call…


--
Regards,
Tadhg
Re: CLI execution [ In reply to ]
we use system calls for quite a few operations. It works well in the context of our application. Just be sure to use IPC::System::Simple for proper error handling. I'm fond of using File::Temp and JSON or YAML encoding for shuttling data around different processes, but others may have different ideas.

On 13/12/2013, at 8:49 AM, Tadhg <tadhg.daley@gmail.com> wrote:

> Hi,
>
>
> I’m working on an information site for my company using Catalyst, MySQL and am Windows. I’m looking for guidance on how to produce some reports. I have a DB which I’m querying for general content/data, but for some reports the information is only available via a CLI, so the question is how should I query the command line?
>
>
> I’m guessing this should be done as part the model layer but I’m unsure of what module to use, google just directs me to how to start the dev server and I didn’t see anything on CPAN’s list of Catalyst Models. Any help would be appreciated.
>
>
> This is all assuming I don’t just use back ticks or system, which I assume is a bad idea as I don’t want the user waiting 30 seconds for a page to load.
>
> Or I could just load the page and execute the report via a AJAX call back to Catalyst using the a basic system call…
>
>
> --
> Regards,
> Tadhg
> _______________________________________________
> 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/