aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/Cobrand.pm b/perllib/FixMyStreet/Cobrand.pm
index ff7d7f943..9f61635d8 100644
--- a/perllib/FixMyStreet/Cobrand.pm
+++ b/perllib/FixMyStreet/Cobrand.pm
@@ -8,7 +8,7 @@ use warnings;
use FixMyStreet;
use Carp;
-use Moose;
+use Package::Stash;
use Module::Pluggable
sub_name => '_cobrands',
@@ -77,11 +77,12 @@ sub available_cobrand_classes {
sub class {
my $avail = shift;
return $avail->{class} if $avail->{class};
- my $moniker = $avail->{moniker};
- Class::MOP::Class->create("FixMyStreet::Cobrand::$moniker" => (
- superclasses => [ 'FixMyStreet::Cobrand::Default' ],
- ));
- return "FixMyStreet::Cobrand::$moniker";
+ my $moniker = "FixMyStreet::Cobrand::$avail->{moniker}";
+ my $class = bless {}, $moniker;
+ my $stash = Package::Stash->new($moniker);
+ my $isa = $stash->get_or_add_symbol('@ISA');
+ @{$isa} = ('FixMyStreet::Cobrand::Default');
+ return $moniker;
}
=head2 get_class_for_host