Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-24 Thread Stefan Adams
I got nothing... Same code, executed the same way... What version of Mojolicious are you using? Instead of using `print`, try `warn` or even better use $c->app->log->info(...) $ perl get_link.pl daemon -m development -l http://*:3002 [Sat Feb 24 10:43:07 2018] [info] Listening at

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-21 Thread amka1791
When I click my link to the zip, that download the zip file. Nothing in the console... mojolicious@poste1:~/rd/test_perl$ perl get_link.pl daemon -m development [Wed Feb 21 16:20:36 2018] [info] Listening at "http://*:3000; Server available at http://127.0.0.1:3000 Hi

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-20 Thread Paolo Saudin
I confirm is working perfectly here too, windows 10 and Mojolicious (7.61, Doughnut). When link point to zip file download it, when point to txt file xhow it's content Paolo 2018-02-21 2:30 GMT+01:00 Stefan Adams : > $ mkdir public > $ date > public/ex1.txt > $ zip public/ex1.zip

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-20 Thread Stefan Adams
$ mkdir public $ date > public/ex1.txt $ zip public/ex1.zip public/ex1.txt $ ls -l get_link.pl public/ -rw-rw-r-- 1 stefan stefan 240 Feb 20 19:20 get_link.pl -rw-rw-r-- 1 stefan stefan 29 Feb 20 19:21 public/ex1.txt -rw-rw-r-- 1 stefan stefan 207 Feb 20 19:21 public/ex1.zip $ perl get_link.pl

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-20 Thread amka1791
Look please this : get_link.pl : -- #!/usr/bin/env perl use Mojolicious::Lite; app->hook(before_dispatch => sub { my $c = shift; print "Hi\n"; }); get '/page' => sub { my $c = shift ; $c->render }; app->start; __DATA__ @@

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-19 Thread Stefan Adams
On Mon, Feb 19, 2018 at 1:31 PM, Илья Рассадин wrote: > Do you have any server dispatching requests before Mojolicious? > > Nginx or Apache maybe? > Agreed. Check out this example: $ cat /tmp/hook use Mojolicious::Lite; # Use /etc as the public folder root (because

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-19 Thread Илья Рассадин
Do you have any server dispatching requests before Mojolicious? Nginx or Apache maybe? On 2/19/18 7:51 PM, amka1...@gmail.com wrote: app->hook(before_dispatch => sub {   my $c = shift;   print "Hi\n"; }); don't react for the links (to .../public folder). Have you please another idea ? -- You

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-19 Thread amka1791
app->hook(before_dispatch => sub { my $c = shift; print "Hi\n"; }); don't react for the links (to .../public folder). Have you please another idea ? -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop

Re: [Mojolicious] Re: trying to catch a clic on a link

2018-02-19 Thread Stefan Adams
On Mon, Feb 19, 2018 at 4:15 AM, wrote: > Hi, > > I tried things like > > app->hook(before_routes => sub { > my $c = shift; > print "Hi\n" > }); > > Changing "before_routes" with other things but impossible : I catch all > the links except my download link :( > I think