From db3d04bca56bb86414acdcc9b5663446a7d67f0a Mon Sep 17 00:00:00 2001 From: fbriere Date: Tue, 14 Feb 2006 01:38:31 +0000 Subject: [PATCH] get_fields now filters out undefs in 3.x --- InternetSecure.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/InternetSecure.pm b/InternetSecure.pm index 58a6ce7..b90f187 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -43,6 +43,18 @@ sub set_defaults { )); } +# OnlinePayment's get_fields now filters out undefs in 3.x. :( +# +sub get_fields { + my ($self, @fields) = @_; + + my %content = $self->content; + + my %new = map +($_ => $content{$_}), @fields; + + return %new; +} + # OnlinePayment's remap_fields is buggy, so we simply rewrite it # sub remap_fields { -- 2.11.0