Browse Source

Refactored master loading a bit for readability

Alois Mahdal 11 years ago
parent
commit
0c9d435218
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      lib/SugarTrail/Repo.pm

+ 5
- 3
lib/SugarTrail/Repo.pm View File

24
     my $self = shift;
24
     my $self = shift;
25
     my $args = { @_ };
25
     my $args = { @_ };
26
 
26
 
27
+    my $src = $args->{source};
28
+
27
     my $master = SugarTrail::Template::Master->new();
29
     my $master = SugarTrail::Template::Master->new();
28
-    $master->{text} = $self->load_text($args->{source})
30
+    $master->{source} = $src;
31
+    $master->{revision} = $self->get_revision($src);
32
+    $master->{text} = $self->load_text($src)
29
         or return;
33
         or return;
30
-    $master->{source} = $args->{source};
31
-    $master->{revision} = $self->get_revision($args->{source});
32
 
34
 
33
     return $master;
35
     return $master;
34
 }
36
 }