X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FVersioned.pm;h=a7c405c6e2be2d58b16b8bb9d50611453d239dae;hp=2ff160f5c033221707716af8c911f11f0025071c;hb=70c288086248e5a4008490df22a56632341f2473;hpb=a1249d49dffc7703374d3ea8aa3637609f21843e diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 2ff160f..a7c405c 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -201,7 +201,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema'; -use Carp::Clan qw/^DBIx::Class/; +use DBIx::Class::Carp; use Time::HiRes qw/gettimeofday/; use Try::Tiny; use namespace::clean; @@ -346,7 +346,7 @@ sub upgrade { # db and schema at same version. do nothing if ( $db_version eq $self->schema_version ) { - carp "Upgrade not necessary\n"; + carp 'Upgrade not necessary'; return; } @@ -417,7 +417,7 @@ sub upgrade_single_step # db and schema at same version. do nothing if ($db_version eq $target_version) { - carp "Upgrade not necessary\n"; + carp 'Upgrade not necessary'; return; } @@ -437,7 +437,7 @@ sub upgrade_single_step $self->create_upgrade_path({ upgrade_file => $upgrade_file }); unless (-f $upgrade_file) { - carp "Upgrade not possible, no upgrade file found ($upgrade_file), please create one\n"; + carp "Upgrade not possible, no upgrade file found ($upgrade_file), please create one"; return; } @@ -612,18 +612,18 @@ sub _on_connect if($pversion eq $self->schema_version) { -# carp "This version is already installed\n"; + #carp "This version is already installed"; return 1; } if(!$pversion) { - carp "Your DB is currently unversioned. Please call upgrade on your schema to sync the DB.\n"; + carp "Your DB is currently unversioned. Please call upgrade on your schema to sync the DB."; return 1; } carp "Versions out of sync. This is " . $self->schema_version . - ", your database contains version $pversion, please call upgrade on your Schema.\n"; + ", your database contains version $pversion, please call upgrade on your Schema."; } # is this just a waste of time? if not then merge with DBI.pm @@ -684,7 +684,7 @@ sub _create_db_to_schema_diff { print $file $diff; close($file); - carp "WARNING: There may be differences between your DB and your DBIC schema. Please review and if necessary run the SQL in $filename to sync your DB.\n"; + carp "WARNING: There may be differences between your DB and your DBIC schema. Please review and if necessary run the SQL in $filename to sync your DB."; }