X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FContestProblem.pm;fp=lib%2FGruntmaster%2FData%2FResult%2FContestProblem.pm;h=fd720add20ca7650dd5cb7521543424f0c4e4b5d;hb=de7226ca2f77bf5d6fab57c61a6fdeb4fcc52c28;hp=4ae5e4b51893e531ce9e4bc62ec3dcb387391304;hpb=c29875088440fd6af00925ecd55bf7fb8a59ad4d;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/ContestProblem.pm b/lib/Gruntmaster/Data/Result/ContestProblem.pm index 4ae5e4b..fd720ad 100644 --- a/lib/Gruntmaster/Data/Result/ContestProblem.pm +++ b/lib/Gruntmaster/Data/Result/ContestProblem.pm @@ -94,9 +94,17 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dTFBC3ZKB2T9SCiyQxxe2w +use Class::Method::Modifiers qw/after/; + sub rawcontest { shift->get_column('contest') } sub rawproblem { shift->get_column('problem') } +after qw/insert update delete/ => sub { + my ($self) = @_; + Gruntmaster::Data::purge '/pb/'; + Gruntmaster::Data::purge '/pb/' . $self->rawproblem; +}; + 1; __END__