From: Arthur Axel "fREW" Schmidt Date: Tue, 20 Oct 2009 16:11:06 +0000 (+0000) Subject: get rid of commented out code X-Git-Tag: v0.900201~51 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a52f4b41dc49206cb5287c3fc2a138c5bd8a575;p=dbsrgits%2FDBIx-Class-Journal.git get rid of commented out code --- diff --git a/lib/DBIx/Class/Journal.pm b/lib/DBIx/Class/Journal.pm index 0f451e4..718597c 100644 --- a/lib/DBIx/Class/Journal.pm +++ b/lib/DBIx/Class/Journal.pm @@ -9,15 +9,6 @@ our $VERSION = '0.900001_02'; ## On create/insert, add new entry to AuditLog -# sub new -# { -# my ($class, $attrs, @rest) = @_; - -# $class->result_source->schema->_journal_schema->current_user(delete $attrs->{user_id}); - -# $class->next::method($attrs, @rest); -# } - sub _journal_schema { my $self = shift; $self->result_source->schema->_journal_schema; @@ -69,14 +60,14 @@ sub journal_log_delete ## On update, copy previous row's contents to AuditHistory -sub update +sub update { my ($self, $upd, @rest) = @_; $self->journal_log_update($upd, @rest); $self->next::method($upd, @rest); } -sub journal_log_update +sub journal_log_update { my ($self, $upd, @rest) = @_; @@ -135,7 +126,7 @@ change, use C<< $schema->_journal_schema >>. =head2 TABLES -The journal schema contains a number of tables. +The journal schema contains a number of tables. =over diff --git a/lib/DBIx/Class/Schema/Journal.pm b/lib/DBIx/Class/Schema/Journal.pm index df7aad0..8e0b7e7 100644 --- a/lib/DBIx/Class/Schema/Journal.pm +++ b/lib/DBIx/Class/Schema/Journal.pm @@ -19,26 +19,6 @@ __PACKAGE__->mk_classdata('journal_nested_changesets'); use strict; use warnings; -# sub throw_exception -# { -# } - -# sub exception_action -# { -# my $self = shift; -# # print STDERR Carp::longmess; - -# $self->next::method(@_); -# } - -# sub load_classes -# { -# my $class = shift; - - -# $class->next::method(@_); - -# } sub _journal_schema_prototype { @@ -66,7 +46,6 @@ sub _journal_schema_prototype next unless($j_sources{$s_name}); $self->create_journal_for($s_name => $proto); $self->class($s_name)->load_components($comp); -# print STDERR "$s_name :", $self->class($s_name), "\n"; } return $proto; } @@ -76,8 +55,6 @@ sub connection my $self = shift; my $schema = $self->next::method(@_); -# print STDERR join(":", $self->sources), "\n"; - my $journal_schema = (ref $self||$self)->_journal_schema_prototype->clone; if($self->journal_connection) diff --git a/lib/DBIx/Class/Schema/Journal/DB/ChangeLog.pm b/lib/DBIx/Class/Schema/Journal/DB/ChangeLog.pm index bf0dc3b..2bc9b01 100644 --- a/lib/DBIx/Class/Schema/Journal/DB/ChangeLog.pm +++ b/lib/DBIx/Class/Schema/Journal/DB/ChangeLog.pm @@ -2,7 +2,6 @@ package DBIx::Class::Schema::Journal::DB::ChangeLog; use base 'DBIx::Class'; -# __PACKAGE__->load_components(qw/Core/); __PACKAGE__->load_components(qw/Ordered Core/); __PACKAGE__->table('changelog'); diff --git a/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm b/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm index 28903c2..688949a 100644 --- a/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm +++ b/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm @@ -30,7 +30,7 @@ __PACKAGE__->add_columns( sub new { my $self = shift->next::method(@_); - $self->set_date(gmtime); # DateTime->now); + $self->set_date(gmtime); return $self; }