Browse Source

Changed source passing to single-arg

...which is ok for internal methods
Alois Mahdal 11 years ago
parent
commit
6e6df1b8ec
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      lib/SugarTrail/Repo.pm
  2. 2
    2
      lib/SugarTrail/Repo/Filesystem.pm

+ 1
- 1
lib/SugarTrail/Repo.pm View File

@@ -25,7 +25,7 @@ sub load_master {
25 25
     my $args = { @_ };
26 26
 
27 27
     my $master = SugarTrail::Template::Master->new();
28
-    $master->{text} = $self->load_text(source => $args->{source})
28
+    $master->{text} = $self->load_text($args->{source})
29 29
         or return;
30 30
     $master->{source} = $args->{source};
31 31
 

+ 2
- 2
lib/SugarTrail/Repo/Filesystem.pm View File

@@ -26,10 +26,10 @@ sub new {
26 26
 
27 27
 sub load_text {
28 28
     my $self = shift;
29
-    my $args = { @_ };
29
+    my $source = shift;
30 30
 
31 31
     # load
32
-    my $fn = $self->{root} . $args->{source};
32
+    my $fn = $self->{root} . $source;
33 33
     my $fh;
34 34
     unless (open $fh, "<", $fn) {
35 35
         $self->{last_error} = "cannot open master $fn for reading: $!";