| 122 | | # in the event that we don't have arglist, |
|---|
| 123 | | # we'll build it using the hashref we do have |
|---|
| 124 | | # we might as well preserve the original ordering |
|---|
| 125 | | # of processing as well, since it's better than |
|---|
| 126 | | # the pseudo random order we get from retrieving the |
|---|
| 127 | | # keys from the hash. |
|---|
| 128 | | unless ($arglist) { |
|---|
| 129 | | $arglist = []; |
|---|
| | 122 | $arglist ||= []; |
|---|
| | 123 | if (@$arglist) { |
|---|
| | 124 | # In the event that $args was manipulated by handlers, |
|---|
| | 125 | # locate any new arguments and add them to $arglist for |
|---|
| | 126 | # processing |
|---|
| | 127 | my %arglist_keys = map { @$_ } @$arglist; |
|---|
| | 128 | if (scalar keys %arglist_keys != scalar keys %$args) { |
|---|
| | 129 | my %more_args = %$args; |
|---|
| | 130 | for (keys %arglist_keys) { |
|---|
| | 131 | delete $more_args{$_} if exists $more_args{$_}; |
|---|
| | 132 | } |
|---|
| | 133 | if (%more_args) { |
|---|
| | 134 | push @$arglist, [ $_ => $more_args{$_} ] foreach |
|---|
| | 135 | grep { exists $Global_filters{$_} || exists $Filters{$_} } |
|---|
| | 136 | keys %more_args; |
|---|
| | 137 | } |
|---|
| | 138 | } |
|---|
| | 139 | } elsif (keys %$args && !@$arglist) { |
|---|
| | 140 | # in the event that we don't have arglist, |
|---|
| | 141 | # we'll build it using the hashref we do have |
|---|
| | 142 | # we might as well preserve the original ordering |
|---|
| | 143 | # of processing as well, since it's better than |
|---|
| | 144 | # the pseudo random order we get from retrieving the |
|---|
| | 145 | # keys from the hash. |
|---|