I am new to using the Mojolicious Perl mod and pretty new doing web design and I am positively stumped trying to pass parameters within a hyperlink. I would rather use the Mojolicious url_for command, but am fine specifying the hyperlink without.
Let's say there are variables $x and $y. Hyperlink text is value for $x.
One of my url_for attempts (although I see I am not encapsulating the href value in quotes:
<a href= <%= url_for("foo")%><%= x=$x&y=$y> %>$x</a>
And here is an attempt without url_for:
<%= <a href="http://foo.com/foo?x=$x&y=$y">%><%= $x %></a>
Actually, in one of my attempts (here just trying to pass one variable), I get to the url I want and I think the text of the url shows the correct syntax for passing a variable, but I do not see it. This is less generic, but:
+$id %>"><%= $id %></a></td></tr>
Here is the url it goes to:
(Looks good to me!) And I have this asking for the parameter:
% use Data::Dumper;
% use CGI;
% my $cgi = new CGI;
% my %input = $cgi->param();
% layout 'default';
% my $dir = '/home/tony/outage-management/testing';
% open (TEST,">$dir/device_list_test.txt");
% print TEST '%input: ', Dumper(%input);
And file device_list_test.txt contains
(The hash is empty.) Maybe I am passing the variable, but I am doing something wrong at the place where I try to fetch it?
For all I know, I am trying to do something in ways that cannot be done. Would sure appreciate a hand.