% if ( ref $links eq 'ARRAY' && scalar @$links ) { % my $deflink = $links->[0]; % my $id = exists $deflink->{source_field} ? $deflink->{source_field} : 'id'; % my $auto = ''; % if ( exists $deflink->{auto} && ref $deflink->{auto} eq 'HASH' ) { % while ( my ($from, $to) = each %{ $deflink->{auto} } ) { % $auto .= '&from='.$from.'&to='.$document->$to; % } % }
% } <%args> $document => undef %args> <%init> return unless ref $document; my $links = $document->table_links; %init>