<%doc> Example: include( '/elements/xmlhttp.html', # required 'url' => $p.'misc/something.html', 'subs' => [ 'subroutine' ], # optional 'method' => 'GET', #defaults to GET, could specify POST 'key' => 'unique', #unique key ); <%shared> my %initialized = ();#won't work if component is "preloaded"... so don't do that <& /elements/rs_init_object.html &> <& /elements/init_overlib.html &> <%init> my ( %opt ) = @_; my $url = $opt{'url'}; my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; #my @subs = @{ $opt{'subs'}; my $key = exists($opt{'key'}) ? $opt{'key'} : ''; $url .= ( ($url =~ /\?/) ? '&' : '?' ) if $method eq 'GET';