[Jifty-commit] r2072 - in jifty/trunk: lib/Jifty/Event
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Oct 27 04:00:28 EDT 2006
Author: jesse
Date: Fri Oct 27 04:00:28 2006
New Revision: 2072
Added:
jifty/trunk/lib/Jifty/Event/
jifty/trunk/lib/Jifty/Event/Model.pm
Modified:
jifty/trunk/ (props changed)
Log:
* oops. missed a file
Added: jifty/trunk/lib/Jifty/Event/Model.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Event/Model.pm Fri Oct 27 04:00:28 2006
@@ -0,0 +1,27 @@
+package Jifty::Event::Model;
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Jifty::Event/;
+
+
+sub new {
+ my $class = shift;
+ my $self = $class->SUPER::new(@_);
+ $self->_check() if (Jifty->config->framework('PubSub')->{'Enable'});
+ return $self;
+}
+
+
+sub _check {
+ my $self = shift;
+ for (qw(record_id record_class action_class
+ action_arguments timestamp result as_hash_before
+ as_hash_after current_user_id)) {
+ Carp::confess("$self missing required parameter $_ ")
+ unless ( defined $$self->{$_} );
+ };
+}
+
+1;
More information about the Jifty-commit
mailing list