- $opts->{'script'} = $script;
- push (@$Scripts, $opts);
+ if (ref ($opts) eq 'ARRAY')
+ {
+ for (@$opts)
+ {
+ my $opt = $_;
+ $opt->{'script'} = $script;
+ push (@$Scripts, $opt);
+ }
+ }
+ else
+ {
+ $opts->{'script'} = $script;
+ push (@$Scripts, $opts);
+ }