Several cosmetic fixups, making next commit easier to read
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / InflateColumn / File.pm
index 3a515a8..b983985 100644 (file)
@@ -3,7 +3,6 @@ package DBIx::Class::InflateColumn::File;
 use strict;
 use warnings;
 use base 'DBIx::Class';
-use File::Path;
 use File::Copy;
 use Path::Class;
 use DBIx::Class::Carp;
@@ -20,7 +19,6 @@ carp 'InflateColumn::File has entered a deprecation cycle. This component '
 unless $ENV{DBIC_IC_FILE_NOWARN};
 
 
-
 __PACKAGE__->load_components(qw/InflateColumn/);
 
 sub register_column {
@@ -68,7 +66,7 @@ sub delete {
 
     for ( keys %$colinfos ) {
         if ( $colinfos->{$_}{is_file_column} ) {
-            rmtree( [$self->_file_column_file($_)->dir], 0, 0 );
+            $self->_file_column_file($_)->dir->rmtree;
             last; # if we've deleted one, we've deleted them all
         }
     }
@@ -116,7 +114,7 @@ sub _save_file_column {
     return unless ref $value;
 
     my $fs_file = $self->_file_column_file($column, $value->{filename});
-    mkpath [$fs_file->dir];
+    $fs_file->dir->mkpath;
 
     # File::Copy doesn't like Path::Class (or any for that matter) objects,
     # thus ->stringify (http://rt.perl.org/rt3/Public/Bug/Display.html?id=59650)