Change packet object representation
authorJacob Bachmeyer <jcb@gnu.org>
Tue, 20 Jun 2023 03:34:01 +0000 (22:34 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Tue, 20 Jun 2023 03:34:01 +0000 (22:34 -0500)
gatekeeper.pl

index 55ee1b7a0bd1fb58a01adc4c10adc223f9f65838..8ff4bbc66fffb94d4a61dae13ba41e96039821b5 100755 (executable)
@@ -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] }
 
 }