On Tue, Feb 13, 2018 at 2:32 PM, <amka1...@gmail.com> wrote:

> Hi,
>
> I am trying to catch a clic on a link, see below (a user clic on
> "href="/rouage-ch_exemple...")
>
> @@ exemplestarifs.html.ep
> ...
> <a href="/rouage-ch_exemple-1.zip">Exemple 1</a> : module 0.09 mm,
> sécurité 0.03 mm, nombres de dents : 11 et 53.<br>
> <a href="/rouage-ch_exemple-2.zip">Exemple 2</a> : module 0.12 mm,
> sécurité 0.04 mm, nombres de dents : 11, 11 et 17.<br>
> <a href="/rouage-ch_exemple-3.zip">Exemple 3</a> : module 0.15 mm,
> sécurité 0.05 mm, nombres de dents : 11, 17, 53 et 11.<br>
> ...
>
> With this code :
>
> get '/rouage-ch_exemple-(:noExemple)' => sub {
>   my $c   = shift;
>   my $noExemple = $c->param('noExemple');
>   log_visite($c,"exemple $noExemple");                       # that
> should write a line in a postresql table, it's the purpose.
> };
>

We can't speak to `log_visite`, so why don't you try
$c->app->log->info("exemple $noExemple"); and then check the STDERR or log/
directory for the output.

Do you know that the route is even being called?

Are your .zip files actually static files in .../public?  If so, that route
won't get hit.  If so, you'll need to use a hook, or not hand them out with
Static.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to