in reply to How to move hard coded URL in tt files to a Catalyst module file

move the hard coded URL in tt file to POST a form

If you want to move any element from the template to the module, it's quite a simple matter of assigning it to a stash variable:

$c->stash('action' => 'http://example.org/cgi-bin/download.pl');
Then you can call it from the template:
<form action="[% action %]" method="POST">

However, for a better answer to your case, I suggest showing the template code as well, and maybe some more information about the task in hand.

Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert

Replies are listed 'Best First'.
Re^2: How to move hard coded URL in tt files to a Catalyst module file
by alwynpan (Acolyte) on Nov 07, 2016 at 07:46 UTC
    Erez, your solution actually worked. It was my bad, there was a typo in the code. Thank you so much.
Re^2: How to move hard coded URL in tt files to a Catalyst module file
by alwynpan (Acolyte) on Nov 07, 2016 at 06:07 UTC
    Hi Erez, Thank you for your help. However, it didn't work for me some how. Here is the code for the tt file. Your solution actually worked. It was my bad, there was a typo in the code. Thank you so much. Regards, Alwyn