X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2FView%2FBase.pm;h=81e50446693305c9491e603fe0d46f20e7b11867;hp=07564c2b8c5b065e008eb36e8ccae347a6962883;hb=a5321bee0139be5c35a1e1ceee47c57138f22f18;hpb=5f90e1e118700c4cba7575299aa42dc4ffc0eb67 diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 07564c2..81e5044 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -15,6 +15,7 @@ sub paths { $root = [ $root ]; } my @output = (); + my $i = 0; foreach my $path (@$root) { push(@output, ( @@ -22,9 +23,10 @@ sub paths { && File::Spec->catdir( $path, $r->model_class->table ) ) ); - push(@output, File::Spec->catdir( $path, "custom" )); + push(@output, File::Spec->catdir( $path, "custom" )) unless ($i); push(@output, $path); - push(@output, File::Spec->catdir( $path, "factory" )); + push(@output, File::Spec->catdir( $path, "factory" )) unless ($i); + $i = 1; } return grep( $_, @output);