From d710e390ee2bd037ba1b66fe657755b03c5fb175 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 19 Jun 2023 22:34:01 -0500 Subject: [PATCH] Change packet object representation --- gatekeeper.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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] } } -- 2.25.1