From: Jacob Bachmeyer Date: Tue, 20 Jun 2023 03:34:01 +0000 (-0500) Subject: Change packet object representation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d710e390ee2bd037ba1b66fe657755b03c5fb175;p=gatekeeper.git Change packet object representation --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 55ee1b7..8ff4bbc 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1630,13 +1630,13 @@ sub find_package { if (ref $_[0]) { @files = @{$_[0]} } else { @files = @_ } - (bless \@files, $class)->init + (bless {files => \@files}, $class)->init } sub init { shift } # scaffolding for now... - sub files { @{(shift)} } + sub files { @{(shift)->{files}} } sub has_uploaded_file { return 0 } } @@ -1645,9 +1645,9 @@ sub find_package { package Local::Packet::Directive; {our @ISA = qw(Local::Packet)} - sub file_name_stem { substr((shift)->[0],0,-(length '.directive.asc')) } + sub file_name_stem { substr(((shift)->files)[0],0,-(length '.directive.asc')) } - sub directive_file_name { (shift)->[0] } + sub directive_file_name { ((shift)->files)[0] } }