Re: [Mojolicious] Re: newbie question about routing

2019-01-05 Thread Stefan Adams
Seems like you understand your problem and have a well-thought out design pattern! I think what you are wanting to accomplish elegantly is exactly what Mojolicious was built for ! Your two sample routes can be condensed into one t

Re: [Mojolicious] Re: newbie question about routing

2019-01-02 Thread hwmbo . lord
Hey, no problem. Mojolicious so far, can do just about anything I can think of, without much difficulty, as most stuff just work out of the box, which is a pleasant surprise. If you don't mind, I'll take a step back, and describe my design and reason behind it, and see if you can maybe spot som

Re: [Mojolicious] Re: newbie question about routing

2019-01-02 Thread Stefan Adams
Hi! I'm glad you were able to figure that out and even using the more advanced hook feature, but if I'm understanding your objective correctly, I would advise that you follow the references I shared. In essence, if I'm reading it correctly, you are using a framework and then solving problems on y

Re: [Mojolicious] Re: Newbie question

2018-04-09 Thread Jan Eskilsson
Hi Tekki search 1works but not search 2 so i guess I'm doing something wrong there. The debug helper works though and the render tries to render the correct template but it throws the error that $mytest needs to be declared. sub search1 { my $self = shift; $self->render(template =>,'stock

Re: [Mojolicious] Re: Newbie question

2018-04-09 Thread Tekki
As long as you get an error message, nothing is broken. ;) Mojolicious tries to render the correct template, so the error must be somewhere on the way to it. Am Montag, 9. April 2018 12:40:13 UTC+2 schrieb Jan Eskilsson: > > I start to believe that my installation is somehow broken, I also have

Re: [Mojolicious] Re: Newbie question

2018-04-09 Thread Jan Eskilsson
Hi Tekki Thank you for your response. I start to believe that my installation is somehow broken, I also have other strange behaviour. I will reinstall to see if it helps Best Regards Jan 2018-04-09 9:56 GMT+02:00 Tekki : > This $self->render you have edited is probably not the place where yo

Re: [Mojolicious] Re: Newbie question : How to run a bash script from inside a Mojolicious application ?

2017-10-31 Thread Jan Henning Thorsen
Hi, You could also consider looking into these alternatives: * https://metacpan.org/pod/Mojo::IOLoop::Subprocess - Run long running (blocking) code in a sub process * https://metacpan.org/pod/Mojo::IOLoop::ForkCall - Pretty similar to Subprocess * https://metacpan.org/pod/Mojo::IOLoop::ReadWrit

Re: [Mojolicious] Re: Newbie question : How to run a bash script from inside a Mojolicious application ?

2017-10-30 Thread Stefan Adams
On Mon, Oct 30, 2017 at 8:56 AM, jay m wrote: > pascal, > > system() and backticks work fine from a Mojolicious app. your problem is > probably one of 3 things: > > * the environment inside the mojo app is different than your interactive > shell environment. compare %ENV to your shell's printenv