X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FView%2FBase.pm;h=9863e155475581355431b4d2636f781a77984a89;hb=e767951f92d57740dc76425868cce32f6bcf1296;hp=07564c2b8c5b065e008eb36e8ccae347a6962883;hpb=15ccc6266852d11e4e4aa10c67b15c70fe9470fb;p=maypole.git diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 07564c2..9863e15 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -1,5 +1,4 @@ package Maypole::View::Base; -use Class::C3; use File::Spec; use UNIVERSAL::moniker; use strict; @@ -15,6 +14,7 @@ sub paths { $root = [ $root ]; } my @output = (); + my $i = 0; foreach my $path (@$root) { push(@output, ( @@ -22,9 +22,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);