[Bast-commits] r9474 - in DBIx-Class/0.08/trunk/lib: DBIx/Class DBIx/Class/InflateColumn DBIx/Class/Relationship DBIx/Class/Schema DBIx/Class/Storage DBIx/Class/Storage/DBI DBIx/Class/Storage/DBI/ODBC DBIx/Class/Storage/DBI/Oracle DBIx/Class/Storage/DBI/Replicated DBIx/Class/Storage/DBI/Sybase SQL/Translator/Parser/DBIx

frew at dev.catalyst.perl.org frew at dev.catalyst.perl.org
Mon May 31 15:11:51 GMT 2010


Author: frew
Date: 2010-05-31 16:11:51 +0100 (Mon, 31 May 2010)
New Revision: 9474

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Exception.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/BelongsTo.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasMany.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasOne.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ADO.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/InterBase.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm
   DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
Log:
use namespace::clean w/ Try::Tiny

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Exception.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Exception.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Exception.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use Carp::Clan qw/^DBIx::Class|^Try::Tiny/;
 use Scalar::Util qw/blessed/;
 use Try::Tiny;
+use namespace::clean;
 
 use overload
     '""' => sub { shift->{msg} },

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -5,6 +5,7 @@
 use base qw/DBIx::Class/;
 use Carp::Clan qw/^DBIx::Class/;
 use Try::Tiny;
+use namespace::clean;
 
 =head1 NAME
 
@@ -12,7 +13,7 @@
 
 =head1 SYNOPSIS
 
-Load this component and then declare one or more 
+Load this component and then declare one or more
 columns to be of the datetime, timestamp or date datatype.
 
   package Event;
@@ -63,9 +64,9 @@
 
 =head1 DESCRIPTION
 
-This module figures out the type of DateTime::Format::* class to 
-inflate/deflate with based on the type of DBIx::Class::Storage::DBI::* 
-that you are using.  If you switch from one database to a different 
+This module figures out the type of DateTime::Format::* class to
+inflate/deflate with based on the type of DBIx::Class::Storage::DBI::*
+that you are using.  If you switch from one database to a different
 one your code should continue to work without modification (though note
 that this feature is new as of 0.07, so it may not be perfect yet - bug
 reports to the list very much welcome).
@@ -296,11 +297,11 @@
 
 =over 4
 
-=item More information about the add_columns method, and column metadata, 
+=item More information about the add_columns method, and column metadata,
       can be found in the documentation for L<DBIx::Class::ResultSource>.
 
 =item Further discussion of problems inherent to the Floating timezone:
-      L<Floating DateTimes|DateTime/Floating_DateTimes> 
+      L<Floating DateTimes|DateTime/Floating_DateTimes>
       and L<< $dt->set_time_zone|DateTime/"Set" Methods >>
 
 =back

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/Base.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use Scalar::Util ();
 use base qw/DBIx::Class/;
 use Try::Tiny;
+use namespace::clean;
 
 =head1 NAME
 
@@ -119,7 +120,7 @@
 =item is_foreign_key_constraint
 
 If you are using L<SQL::Translator> to create SQL for you and you find that it
-is creating constraints where it shouldn't, or not creating them where it 
+is creating constraints where it shouldn't, or not creating them where it
 should, set this attribute to a true or false value to override the detection
 of when to create constraints.
 
@@ -127,8 +128,8 @@
 
 If C<cascade_copy> is true on a C<has_many> relationship for an
 object, then when you copy the object all the related objects will
-be copied too. To turn this behaviour off, pass C<< cascade_copy => 0 >> 
-in the C<$attr> hashref. 
+be copied too. To turn this behaviour off, pass C<< cascade_copy => 0 >>
+in the C<$attr> hashref.
 
 The behaviour defaults to C<< cascade_copy => 1 >> for C<has_many>
 relationships.
@@ -137,7 +138,7 @@
 
 By default, DBIx::Class cascades deletes across C<has_many>,
 C<has_one> and C<might_have> relationships. You can disable this
-behaviour on a per-relationship basis by supplying 
+behaviour on a per-relationship basis by supplying
 C<< cascade_delete => 0 >> in the relationship attributes.
 
 The cascaded operations are performed after the requested delete,
@@ -160,14 +161,14 @@
 =item on_delete / on_update
 
 If you are using L<SQL::Translator> to create SQL for you, you can use these
-attributes to explicitly set the desired C<ON DELETE> or C<ON UPDATE> constraint 
-type. If not supplied the SQLT parser will attempt to infer the constraint type by 
+attributes to explicitly set the desired C<ON DELETE> or C<ON UPDATE> constraint
+type. If not supplied the SQLT parser will attempt to infer the constraint type by
 interrogating the attributes of the B<opposite> relationship. For any 'multi'
-relationship with C<< cascade_delete => 1 >>, the corresponding belongs_to 
-relationship will be created with an C<ON DELETE CASCADE> constraint. For any 
+relationship with C<< cascade_delete => 1 >>, the corresponding belongs_to
+relationship will be created with an C<ON DELETE CASCADE> constraint. For any
 relationship bearing C<< cascade_copy => 1 >> the resulting belongs_to constraint
 will be C<ON UPDATE CASCADE>. If you wish to disable this autodetection, and just
-use the RDBMS' default constraint type, pass C<< on_delete => undef >> or 
+use the RDBMS' default constraint type, pass C<< on_delete => undef >> or
 C<< on_delete => '' >>, and the same for C<on_update> respectively.
 
 =item is_deferrable
@@ -305,7 +306,7 @@
 
   ( $objects_rs ) = $rs->search_related_rs('relname', $cond, $attrs);
 
-This method works exactly the same as search_related, except that 
+This method works exactly the same as search_related, except that
 it guarantees a resultset, even in list context.
 
 =cut
@@ -335,9 +336,9 @@
   my $new_obj = $obj->new_related('relname', \%col_data);
 
 Create a new item of the related foreign class. If called on a
-L<Row|DBIx::Class::Manual::Glossary/"Row"> object, it will magically 
-set any foreign key columns of the new object to the related primary 
-key columns of the source object for you.  The newly created item will 
+L<Row|DBIx::Class::Manual::Glossary/"Row"> object, it will magically
+set any foreign key columns of the new object to the related primary
+key columns of the source object for you.  The newly created item will
 not be saved into your storage until you call L<DBIx::Class::Row/insert>
 on it.
 
@@ -532,7 +533,7 @@
 =back
 
   my $actor = $schema->resultset('Actor')->find(1);
-  my @roles = $schema->resultset('Role')->search({ role => 
+  my @roles = $schema->resultset('Role')->search({ role =>
      { '-in' => ['Fred', 'Barney'] } } );
 
   $actor->set_roles(\@roles);

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/BelongsTo.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/BelongsTo.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/BelongsTo.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -7,8 +7,9 @@
 use strict;
 use warnings;
 use Try::Tiny;
+use namespace::clean;
 
-our %_pod_inherit_config = 
+our %_pod_inherit_config =
   (
    class_map => { 'DBIx::Class::Relationship::BelongsTo' => 'DBIx::Class::Relationship' }
   );
@@ -17,7 +18,7 @@
   my ($class, $rel, $f_class, $cond, $attrs) = @_;
 
   # assume a foreign key contraint unless defined otherwise
-  $attrs->{is_foreign_key_constraint} = 1 
+  $attrs->{is_foreign_key_constraint} = 1
     if not exists $attrs->{is_foreign_key_constraint};
   $attrs->{undef_on_null_fk} = 1
     if not exists $attrs->{undef_on_null_fk};

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasMany.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasMany.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasMany.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -4,8 +4,9 @@
 use strict;
 use warnings;
 use Try::Tiny;
+use namespace::clean;
 
-our %_pod_inherit_config = 
+our %_pod_inherit_config =
   (
    class_map => { 'DBIx::Class::Relationship::HasMany' => 'DBIx::Class::Relationship' }
   );
@@ -15,7 +16,7 @@
 
   unless (ref $cond) {
     $class->ensure_class_loaded($f_class);
-    my ($pri, $too_many) = try { $class->_pri_cols } 
+    my ($pri, $too_many) = try { $class->_pri_cols }
       catch {
         $class->throw_exception("Can't infer join condition for ${rel} on ${class}: $_");
       };

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasOne.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasOne.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship/HasOne.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -5,8 +5,9 @@
 use warnings;
 use Carp::Clan qw/^DBIx::Class/;
 use Try::Tiny;
+use namespace::clean;
 
-our %_pod_inherit_config = 
+our %_pod_inherit_config =
   (
    class_map => { 'DBIx::Class::Relationship::HasOne' => 'DBIx::Class::Relationship' }
   );

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -9,6 +9,7 @@
 use DBIx::Class::Exception;
 use Carp::Clan qw/^DBIx::Class/;
 use Try::Tiny;
+use namespace::clean;
 
 use base qw/DBIx::Class/;
 
@@ -143,7 +144,7 @@
 If a column name beginning with a plus sign ('+col1') is provided, the
 attributes provided will be merged with any existing attributes for the
 column, with the new attributes taking precedence in the case that an
-attribute already exists. Using this without a hashref 
+attribute already exists. Using this without a hashref
 (C<< $source->add_columns(qw/+col1 +col2/) >>) is legal, but useless --
 it does the same thing it would do without the plus.
 
@@ -175,7 +176,7 @@
 
 This contains the column type. It is automatically filled if you use the
 L<SQL::Translator::Producer::DBIx::Class::File> producer, or the
-L<DBIx::Class::Schema::Loader> module. 
+L<DBIx::Class::Schema::Loader> module.
 
 Currently there is no standard set of values for the data_type. Use
 whatever your database supports.
@@ -899,7 +900,7 @@
 
   my $schema = $source->schema();
 
-Returns the L<DBIx::Class::Schema> object that this result source 
+Returns the L<DBIx::Class::Schema> object that this result source
 belongs to.
 
 =head2 storage
@@ -1478,7 +1479,7 @@
                     keys %{$rel_info->{cond}};
       my @ord = (ref($rel_info->{attrs}{order_by}) eq 'ARRAY'
                    ? @{$rel_info->{attrs}{order_by}}
-   
+
                 : (defined $rel_info->{attrs}{order_by}
                        ? ($rel_info->{attrs}{order_by})
                        : ()));
@@ -1536,7 +1537,7 @@
 
 =head2 handle
 
-Obtain a new handle to this source. Returns an instance of a 
+Obtain a new handle to this source. Returns an instance of a
 L<DBIx::Class::ResultSourceHandle>.
 
 =cut

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -8,6 +8,7 @@
 use DBIx::Class::Exception;
 use Scalar::Util ();
 use Try::Tiny;
+use namespace::clean;
 
 ###
 ### Internal method
@@ -1115,7 +1116,7 @@
 
   if ($source->isa('DBIx::Class::ResultSourceHandle')) {
     $source = $source_handle->resolve
-  } 
+  }
   else {
     $source_handle = $source->handle
   }

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -183,6 +183,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Time::HiRes qw/gettimeofday/;
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_classdata('_filedata');
 __PACKAGE__->mk_classdata('upgrade_directory');
@@ -683,13 +684,13 @@
   # This is necessary since there are legitimate cases when upgrades can happen
   # back to back within the same second. This breaks things since we relay on the
   # ability to sort by the 'installed' value. The logical choice of an autoinc
-  # is not possible, as it will break multiple legacy installations. Also it is 
+  # is not possible, as it will break multiple legacy installations. Also it is
   # not possible to format the string sanely, as the column is a varchar(20).
   # The 'v' character is added to the front of the string, so that any version
   # formatted by this new function will sort _after_ any existing 200... strings.
   my @tm = gettimeofday();
   my @dt = gmtime ($tm[0]);
-  my $o = $vtable->create({ 
+  my $o = $vtable->create({
     version => $version,
     installed => sprintf("v%04d%02d%02d_%02d%02d%02d.%03.0f",
       $dt[5] + 1900,

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -10,6 +10,7 @@
 use File::Spec;
 use Sub::Name ();
 use Module::Find();
+use namespace::clean;
 
 use base qw/DBIx::Class/;
 
@@ -99,7 +100,7 @@
 If a Result class is found to already have a ResultSet class set using
 L</resultset_class> to some other class, you will be warned like this:
 
-  We found ResultSet class '$rs_class' for '$result', but it seems 
+  We found ResultSet class '$rs_class' for '$result', but it seems
   that you had already set '$result' to use '$rs_set' instead
 
 Both of the sub-namespaces are configurable if you don't like the defaults,
@@ -320,7 +321,7 @@
 If any classes found do not appear to be Result class files, you will
 get the following warning:
 
-   Failed to load $comp_class. Can't find source_name method. Is 
+   Failed to load $comp_class. Can't find source_name method. Is
    $comp_class really a full DBIC result class? Fix it, move it elsewhere,
    or make your load_classes call more specific.
 
@@ -480,11 +481,11 @@
 
 =back
 
-An optional sub which you can declare in your own Schema class that will get 
+An optional sub which you can declare in your own Schema class that will get
 passed the L<SQL::Translator::Schema> object when you deploy the schema via
 L</create_ddl_dir> or L</deploy>.
 
-For an example of what you can do with this, see 
+For an example of what you can do with this, see
 L<DBIx::Class::Manual::Cookbook/Adding Indexes And Functions To Your SQL>.
 
 Note that sqlt_deploy_hook is called by L</deployment_statements>, which in turn
@@ -656,7 +657,7 @@
 
 =head2 txn_scope_guard
 
-Runs C<txn_scope_guard> on the schema's storage. See 
+Runs C<txn_scope_guard> on the schema's storage. See
 L<DBIx::Class::Storage/txn_scope_guard>.
 
 =cut
@@ -742,7 +743,7 @@
 
 Pass this method a resultsource name, and an arrayref of
 arrayrefs. The arrayrefs should contain a list of column names,
-followed by one or many sets of matching data for the given columns. 
+followed by one or many sets of matching data for the given columns.
 
 In void context, C<insert_bulk> in L<DBIx::Class::Storage::DBI> is used
 to insert the data, as this is a fast method. However, insert_bulk currently
@@ -762,16 +763,16 @@
     ...
   ]);
 
-Since wantarray context is basically the same as looping over $rs->create(...) 
+Since wantarray context is basically the same as looping over $rs->create(...)
 you won't see any performance benefits and in this case the method is more for
 convenience. Void context sends the column information directly to storage
-using <DBI>s bulk insert method. So the performance will be much better for 
+using <DBI>s bulk insert method. So the performance will be much better for
 storages that support this method.
 
-Because of this difference in the way void context inserts rows into your 
+Because of this difference in the way void context inserts rows into your
 database you need to note how this will effect any loaded components that
-override or augment insert.  For example if you are using a component such 
-as L<DBIx::Class::UUIDColumns> to populate your primary keys you MUST use 
+override or augment insert.  For example if you are using a component such
+as L<DBIx::Class::UUIDColumns> to populate your primary keys you MUST use
 wantarray context if you want the PKs automatically created.
 
 =cut
@@ -785,7 +786,7 @@
         $rs->populate($data);
     }
   } else {
-      $self->throw_exception("$name is not a resultset"); 
+      $self->throw_exception("$name is not a resultset");
   }
 }
 
@@ -813,7 +814,7 @@
   my ($self, @info) = @_;
   return $self if !@info && $self->storage;
 
-  my ($storage_class, $args) = ref $self->storage_type ? 
+  my ($storage_class, $args) = ref $self->storage_type ?
     ($self->_normalize_storage_type($self->storage_type),{}) : ($self->storage_type, {});
 
   $storage_class = 'DBIx::Class::Storage'.$storage_class
@@ -934,7 +935,7 @@
 
 =head2 svp_begin
 
-Creates a new savepoint (does nothing outside a transaction). 
+Creates a new savepoint (does nothing outside a transaction).
 Equivalent to calling $schema->storage->svp_begin.  See
 L<DBIx::Class::Storage/"svp_begin"> for more information.
 
@@ -951,7 +952,7 @@
 
 =head2 svp_release
 
-Releases a savepoint (does nothing outside a transaction). 
+Releases a savepoint (does nothing outside a transaction).
 Equivalent to calling $schema->storage->svp_release.  See
 L<DBIx::Class::Storage/"svp_release"> for more information.
 
@@ -968,7 +969,7 @@
 
 =head2 svp_rollback
 
-Rollback to a savepoint (does nothing outside a transaction). 
+Rollback to a savepoint (does nothing outside a transaction).
 Equivalent to calling $schema->storage->svp_rollback.  See
 L<DBIx::Class::Storage/"svp_rollback"> for more information.
 
@@ -1052,8 +1053,8 @@
 created. For quoting purposes supply C<quote_table_names> and
 C<quote_field_names>.
 
-Additionally, the DBIx::Class parser accepts a C<sources> parameter as a hash 
-ref or an array ref, containing a list of source to deploy. If present, then 
+Additionally, the DBIx::Class parser accepts a C<sources> parameter as a hash
+ref or an array ref, containing a list of source to deploy. If present, then
 only the sources listed will get deployed. Furthermore, you can use the
 C<add_fk_index> parser parameter to prevent the parser from creating an index for each
 FK.
@@ -1100,7 +1101,7 @@
 
 =back
 
-A convenient shortcut to 
+A convenient shortcut to
 C<< $self->storage->create_ddl_dir($self, @args) >>.
 
 Creates an SQL file based on the Schema, for each of the specified
@@ -1141,7 +1142,7 @@
     my $filename = $table->ddl_filename($type, $dir, $version, $preversion)
 
  In recent versions variables $dir and $version were reversed in order to
- bring the signature in line with other Schema/Storage methods. If you 
+ bring the signature in line with other Schema/Storage methods. If you
  really need to maintain backward compatibility, you can do the following
  in any overriding methods:
 
@@ -1162,7 +1163,7 @@
 
 =head2 thaw
 
-Provided as the recommended way of thawing schema objects. You can call 
+Provided as the recommended way of thawing schema objects. You can call
 C<Storable::thaw> directly if you wish, but the thawed objects will not have a
 reference to any schema, so are rather useless.
 
@@ -1239,7 +1240,7 @@
 
 =back
 
-This method is called by L</load_namespaces> and L</load_classes> to install the found classes into your Schema. You should be using those instead of this one. 
+This method is called by L</load_namespaces> and L</load_classes> to install the found classes into your Schema. You should be using those instead of this one.
 
 You will only need this method if you have your Result classes in
 files which are not named after the packages (or all in the same
@@ -1304,7 +1305,7 @@
 
 =back
 
-As L</register_source> but should be used if the result class already 
+As L</register_source> but should be used if the result class already
 has a source and you want to register an extra one.
 
 =cut
@@ -1349,7 +1350,7 @@
 
 sub _unregister_source {
     my ($self, $moniker) = @_;
-    my %reg = %{$self->source_registrations}; 
+    my %reg = %{$self->source_registrations};
 
     my $source = delete $reg{$moniker};
     $self->source_registrations(\%reg);

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ADO.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ADO.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ADO.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -3,6 +3,7 @@
 
 use base 'DBIx::Class::Storage::DBI';
 use Try::Tiny;
+use namespace::clean;
 
 sub _rebless {
   my $self = shift;

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Cursor.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use base qw/DBIx::Class::Cursor/;
 
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors('simple' =>
     qw/sth/

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/InterBase.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/InterBase.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/InterBase.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use mro 'c3';
 use List::Util();
 use Try::Tiny;
+use namespace::clean;
 
 =head1 NAME
 
@@ -40,13 +41,13 @@
   }
 
   $self->throw_exception('No sequence to fetch') unless $sequence;
-  
+
   my ($val) = $self->_get_dbh->selectrow_array(
 'SELECT GEN_ID(' . $self->sql_maker->_quote($sequence) .
 ', 1) FROM rdb$database');
 
   return $val;
-} 
+}
 
 sub _dbh_get_autoinc_seq {
   my ($self, $dbh, $source, $col) = @_;

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/MSSQL.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use base qw/DBIx::Class::Storage::DBI::UniqueIdentifier/;
 use mro 'c3';
 use Try::Tiny;
+use namespace::clean;
 
 use List::Util();
 
@@ -162,7 +163,7 @@
   if (
     $sql !~ /^ \s* SELECT \s+ TOP \s+ \d+ \s+ /xi
       &&
-    scalar $self->_parse_order_by ($attrs->{order_by}) 
+    scalar $self->_parse_order_by ($attrs->{order_by})
   ) {
     $self->throw_exception(
       'An ordered subselect encountered - this is not safe! Please see "Ordered Subselects" in DBIx::Class::Storage::DBI::MSSQL
@@ -197,7 +198,7 @@
 
 sub datetime_parser_type {
   'DBIx::Class::Storage::DBI::MSSQL::DateTime::Format'
-} 
+}
 
 sub sqlt_type { 'SQLServer' }
 
@@ -253,7 +254,7 @@
 package # hide from PAUSE
   DBIx::Class::Storage::DBI::MSSQL::DateTime::Format;
 
-my $datetime_format      = '%Y-%m-%d %H:%M:%S.%3N'; # %F %T 
+my $datetime_format      = '%Y-%m-%d %H:%M:%S.%3N'; # %F %T
 my $smalldatetime_format = '%Y-%m-%d %H:%M:%S';
 
 my ($datetime_parser, $smalldatetime_parser);

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -8,6 +8,7 @@
 use List::Util();
 use Scalar::Util ();
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors(simple => qw/
   _using_dynamic_cursors

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/ODBC.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -5,6 +5,7 @@
 use base qw/DBIx::Class::Storage::DBI/;
 use mro 'c3';
 use Try::Tiny;
+use namespace::clean;
 
 sub _rebless {
   my ($self) = @_;

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -5,6 +5,7 @@
 use Scope::Guard ();
 use Context::Preserve ();
 use Try::Tiny;
+use namespace::clean;
 
 =head1 NAME
 
@@ -355,7 +356,7 @@
   my $txn_scope_guard = $self->txn_scope_guard;
 
   $self->_do_query('alter session set constraints = deferred');
-  
+
   my $sg = Scope::Guard->new(sub {
     $self->_do_query('alter session set constraints = immediate');
   });

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use base qw/DBIx::Class::Storage::DBI/;
 use mro 'c3';
 use Try::Tiny;
+use namespace::clean;
 
 sub _rebless {
     my ($self) = @_;

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -4,8 +4,8 @@
 use Scalar::Util 'reftype';
 requires qw/_query_start/;
 
+use Try::Tiny;
 use namespace::clean -except => 'meta';
-use Try::Tiny;
 
 =head1 NAME
 

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Replicated.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -17,6 +17,7 @@
 use Hash::Merge;
 use List::Util qw/min max reduce/;
 use Try::Tiny;
+use namespace::clean;
 
 use namespace::clean -except => 'meta';
 
@@ -38,7 +39,7 @@
   $schema->storage_type( ['::DBI::Replicated', {balancer=>'::Random'}] );
   $schema->connection(...);
 
-Next, you need to add in the Replicants.  Basically this is an array of 
+Next, you need to add in the Replicants.  Basically this is an array of
 arrayrefs, where each arrayref is database connect information.  Think of these
 arguments as what you'd pass to the 'normal' $schema->connect method.
 
@@ -59,7 +60,7 @@
   my $RS = $schema->resultset('Source')->search(undef, {force_pool=>'master'});
 
 Now $RS will force everything (both reads and writes) to use whatever was setup
-as the master storage.  'master' is hardcoded to always point to the Master, 
+as the master storage.  'master' is hardcoded to always point to the Master,
 but you can also use any Replicant name.  Please see:
 L<DBIx::Class::Storage::DBI::Replicated::Pool> and the replicants attribute for more.
 
@@ -124,7 +125,7 @@
 
 =head2 pool_type
 
-Contains the classname which will instantiate the L</pool> object.  Defaults 
+Contains the classname which will instantiate the L</pool> object.  Defaults
 to: L<DBIx::Class::Storage::DBI::Replicated::Pool>.
 
 =cut
@@ -206,7 +207,7 @@
 
 =head2 balancer
 
-Is a <DBIx::Class::Storage::DBI::Replicated::Balancer> or derived class.  This 
+Is a <DBIx::Class::Storage::DBI::Replicated::Balancer> or derived class.  This
 is a class that takes a pool (<DBIx::Class::Storage::DBI::Replicated::Pool>)
 
 =cut
@@ -236,7 +237,7 @@
 
 =head1 ATTRIBUTES IMPLEMENTING THE DBIx::Storage::DBI INTERFACE
 
-The following methods are delegated all the methods required for the 
+The following methods are delegated all the methods required for the
 L<DBIx::Class::Storage::DBI> interface.
 
 =head2 read_handler
@@ -253,7 +254,7 @@
     select
     select_single
     columns_info_for
-    _dbh_columns_info_for 
+    _dbh_columns_info_for
     _select
   /],
 );
@@ -467,7 +468,7 @@
 =cut
 
 sub BUILDARGS {
-  my ($class, $schema, $storage_type_args, @args) = @_;  
+  my ($class, $schema, $storage_type_args, @args) = @_;
 
   return {
     schema=>$schema,
@@ -620,7 +621,7 @@
   my $reliably = sub {
     my $name = shift @_;
     $schema->resultset('User')->create({name=>$name});
-    my $user_rs = $schema->resultset('User')->find({name=>$name}); 
+    my $user_rs = $schema->resultset('User')->find({name=>$name});
     return $user_rs;
   };
 
@@ -918,7 +919,7 @@
   my $self = shift;
 
   return max map $_->lag_behind_master, $self->replicants;
-} 
+}
 
 =head2 is_replicating
 
@@ -966,7 +967,7 @@
 
 sub _driver_determined {
   my $self = shift;
-  
+
   if (@_) {
     $_->_driver_determined(@_) for $self->all_storages;
   }
@@ -976,19 +977,19 @@
 
 sub _init {
   my $self = shift;
-  
+
   $_->_init for $self->all_storages;
 }
 
 sub _run_connection_actions {
   my $self = shift;
-  
+
   $_->_run_connection_actions for $self->all_storages;
 }
 
 sub _do_connection_actions {
   my $self = shift;
-  
+
   if (@_) {
     $_->_do_connection_actions(@_) for $self->all_storages;
   }
@@ -1029,7 +1030,7 @@
 
   if (not $self->_server_info_hash) {
     my $min_version_info = (
-      reduce { $a->[0] < $b->[0] ? $a : $b } 
+      reduce { $a->[0] < $b->[0] ? $a : $b }
       map [ $numify_ver->($_->{dbms_version}), $_ ],
       map $_->_server_info, $self->all_storages
     )->[1];

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -6,6 +6,7 @@
 use mro 'c3';
 use List::Util ();
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors(simple => qw/
   _identity
@@ -43,7 +44,7 @@
   my ($source, $to_insert) = @_;
 
   my $identity_col = List::Util::first {
-      $source->column_info($_)->{is_auto_increment} 
+      $source->column_info($_)->{is_auto_increment}
   } $source->columns;
 
 # user might have an identity PK without is_auto_increment

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -14,6 +14,7 @@
 use Sub::Name();
 use Data::Dumper::Concise();
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors('simple' =>
     qw/_identity _blob_log_on_update _writer_storage _is_extra_storage

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Sybase.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 use Try::Tiny;
+use namespace::clean;
 
 use base qw/DBIx::Class::Storage::DBI/;
 

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -17,6 +17,7 @@
 use Sub::Name ();
 use Try::Tiny;
 use File::Path ();
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors('simple' =>
   qw/_connect_info _dbi_connect_info _dbh _sql_maker _sql_maker_opts _conn_pid
@@ -1680,7 +1681,7 @@
       $sth->finish
     }
     catch {
-      $err = shift unless defined $err 
+      $err = shift unless defined $err
     };
   };
 

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/TxnScopeGuard.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -4,6 +4,7 @@
 use warnings;
 use Carp::Clan qw/^DBIx::Class/;
 use Try::Tiny;
+use namespace::clean;
 
 sub new {
   my ($class, $storage) = @_;
@@ -78,7 +79,7 @@
 =head1 DESCRIPTION
 
 An object that behaves much like L<Scope::Guard>, but hardcoded to do the
-right thing with transactions in DBIx::Class. 
+right thing with transactions in DBIx::Class.
 
 =head1 METHODS
 

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -11,6 +11,7 @@
 use IO::File;
 use DBIx::Class::Storage::TxnScopeGuard;
 use Try::Tiny;
+use namespace::clean;
 
 __PACKAGE__->mk_group_accessors('simple' => qw/debug debugobj schema/);
 __PACKAGE__->mk_group_accessors('inherited' => 'cursor_class');
@@ -479,8 +480,8 @@
 written to the file C</path/name>.
 
 This environment variable is checked when the storage object is first
-created (when you call connect on your schema).  So, run-time changes 
-to this environment variable will not take effect unless you also 
+created (when you call connect on your schema).  So, run-time changes
+to this environment variable will not take effect unless you also
 re-connect on your schema.
 
 =head2 DBIX_CLASS_STORAGE_DBI_DEBUG

Modified: DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm	2010-05-31 15:06:49 UTC (rev 9473)
+++ DBIx-Class/0.08/trunk/lib/SQL/Translator/Parser/DBIx/Class.pm	2010-05-31 15:11:51 UTC (rev 9474)
@@ -17,6 +17,7 @@
 use Carp::Clan qw/^SQL::Translator|^DBIx::Class|^Try::Tiny/;
 use Scalar::Util ();
 use Try::Tiny;
+use namespace::clean;
 
 use base qw(Exporter);
 
@@ -64,7 +65,7 @@
         $dbicschema->throw_exception ("'sources' parameter must be an array or hash ref")
           unless( $ref eq 'ARRAY' || ref eq 'HASH' );
 
-        # limit monikers to those specified in 
+        # limit monikers to those specified in
         my $sources;
         if ($ref eq 'ARRAY') {
             $sources->{$_} = 1 for (@$limit_sources);
@@ -170,7 +171,7 @@
             # Force the order of @cond to match the order of ->add_columns
             my $idx;
             my %other_columns_idx = map {'foreign.'.$_ => ++$idx } $relsource->columns;
-            my @cond = sort { $other_columns_idx{$a} cmp $other_columns_idx{$b} } keys(%{$rel_info->{cond}}); 
+            my @cond = sort { $other_columns_idx{$a} cmp $other_columns_idx{$b} } keys(%{$rel_info->{cond}});
 
             # Get the key information, mapping off the foreign/self markers
             my @refkeys = map {/^\w+\.(\w+)$/} @cond;




More information about the Bast-commits mailing list