[Templates] specify keys() vmethod

2010-03-15 Thread Felipe Gasper (cPanel)
Hello, If I have the following template code: -- SET test_hash = { 'keys' => 'foo', 'bar' => 'baz', }; GET test_hash.keys(); -- ...what I get back is “foo” rather than an array reference. The .items() hash vmethod allows me to specify that I want an ite

Re: [Templates] specify keys() vmethod

2010-03-29 Thread Josh Rosenbaum
On 3/15/2010 12:41 PM, Felipe Gasper (cPanel) wrote: > -- > SET test_hash = { > 'keys' => 'foo', > 'bar' => 'baz', > }; > > GET test_hash.keys(); > -- > > ...what I get back is “foo” rather than an array reference. > > The .items() hash vmethod allows me to specify th

Re: [Templates] specify keys() vmethod

2010-03-29 Thread Bill Moseley
(Sorry Felipe for the double reply) On Mon, Mar 15, 2010 at 11:41 AM, Felipe Gasper (cPanel) wrote: > Hello, > >If I have the following template code: > > -- > SET test_hash = { >'keys' => 'foo', >'bar' => 'baz', > }; > > GET test_hash.keys(); > -- > This

Re: [Templates] specify keys() vmethod

2010-03-29 Thread Bill Moseley
On Mon, Mar 29, 2010 at 2:26 PM, Felipe Gasper (cPanel) wrote: > Bill Moseley wrote on 29 Mar 2010 4:24 PM... > >> This isn't what you get? >> >> $ tpage >> [% h = { one => 1, two => 2 }; x = h.keys; USE Dumper; Dumper.dump( x ) %] >> $VAR1 = [ >> 'one', >> 'two' >> ]; >> >> > > For your