1 package DBIx::Class::Journal::EvalWrap;
2 use base qw(DBIx::Class::Journal);
7 foreach my $method (qw(journal_log_update journal_log_insert journal_log_delete)) {
9 eval "sub $method " . ' {
10 my ( $self, @args ) = @_;
12 eval { $self->next::method(@args) };
25 DBIx::Class::Journal::EvalWrap - Wrap all journal ops with an eval { }
29 __PACKAGE__->journal_component("Journal::EvalWrap");
33 This component is a wrapper for the row methods in L<DBIx:Class::Journal> that
34 aides in retrofitting a schema for journaling, by wrapping all the journal CRUD
35 operations with a C<local $@; eval { ... }}.
37 This is desirable if you'd rather lose journal data than create runtime errors
38 when retrofitting existing code.