#THE CALL
tabs( side => "right", selected => 1,
tabs => [{ title => "To Do", url => "?tab2=1"},
#THE SUB
sub tabs {
%args = @_;
print "Selected: $args{'selected'}
";
print "Side: $args{'side'}
";
print "
".Dumper($args{'tabs'})."
";
@tabs = $args{'tabs'};
print "".Dumper($tabs[0][0])."
";
print "".Dumper($tabs[0][1])."
";
@tabs = @{$args{'tabs'}};
print "".Dumper(@tabs)."
";
#So I've got the output correct to here I think. In @tabs is two values which are both hashtables..
#Now I just need to figure out how to access them.
#THE OUTPUT
$VAR1 = [ { 'url' => '?tab2=1', 'title' => 'To Do' }, { 'url' => '?tab2=2', 'title' => 'Tried' } ];
$VAR1 = { 'url' => '?tab2=1', 'title' => 'To Do' };
$VAR1 = { 'url' => '?tab2=2', 'title' => 'Tried' };
#@tabs
$VAR1 = { 'url' => '?tab2=1', 'title' => 'To Do' }; $VAR2 = { 'url' => '?tab2=2', 'title' => 'Tried' };