[htmltmpl] HTML::Pager persist_var
Brought to you by:
samtregar
From: Greg J. <gr...@al...> - 2004-06-09 03:35:26
|
Could someone enlighten me on the proper way to pass an array ref to this part of the new() call ? I've tried persist_vars => [@$array ] WHERE : @array = ("PostalCode", $searchZip); $array = \@array; $SearchZip = 99654; it works but I get the following printed to the template: <input type="hidden" name="PostalCode" value="99654" /> <input type="hidden" name="99654" value="" /> as you can see the second part of the array is repeated . I've tried variations , each time an additional line is produced duplicating the second item in the array or just produces a string value or fails I've tried persist_vars => [@array ] I've tried persist_vars => [$array ] even passing the value directly like: persist_vars => [ 'PostalCode', '$searchZip'] He I'm not claiming to be a perl expert , I don't work with refrences as much as I should so please be easy on me : ) i would like to be able to pass up to 14 different name value pairs to produce 14 different hidden input fields , I'm sure I must be passing the array ref wrong , but Evey thing i try produces bad results. Can some one give me a clue ? thanks for any help Greg |