From: Peter Rabbitson Date: Fri, 5 Sep 2014 08:33:40 +0000 (+0200) Subject: Make sure IO::Handle is loaded - missing stubs on older perls X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d93345c2f06a03076dcb43cb256de5c973c203b;p=dbsrgits%2FDBIx-Class-Historic.git Make sure IO::Handle is loaded - missing stubs on older perls Also adjust the documentation in the wake of the e9f71ab2a change --- diff --git a/lib/DBIx/Class/Storage.pm b/lib/DBIx/Class/Storage.pm index ad1770e..572f87e 100644 --- a/lib/DBIx/Class/Storage.pm +++ b/lib/DBIx/Class/Storage.pm @@ -436,10 +436,10 @@ shell environment. =head2 debugfh -Set or retrieve the filehandle used for trace/debug output. This should be -an IO::Handle compatible object (only the C method is used). Initially -set to be STDERR - although see information on the -L environment variable. +An opportunistic proxy to L<< ->debugobj->debugfh(@_) +|DBIx::Class::Storage::Statistics/debugfh >> +If the currently set L does not have a L method, caling +this is a no-op. =cut diff --git a/lib/DBIx/Class/Storage/Statistics.pm b/lib/DBIx/Class/Storage/Statistics.pm index e241ad4..4894cf7 100644 --- a/lib/DBIx/Class/Storage/Statistics.pm +++ b/lib/DBIx/Class/Storage/Statistics.pm @@ -15,6 +15,7 @@ BEGIN { extends 'DBIx::Class'; use DBIx::Class::_Util qw(sigwarn_silencer qsub); +use IO::Handle (); use namespace::clean; =head1 NAME @@ -42,11 +43,13 @@ Returns a new L object. =head2 debugfh Sets or retrieves the filehandle used for trace/debug output. This should -be an IO::Handle compatible object (only the C method is used). Initially -should be set to STDERR - although see information on the -L environment variable. +be an L compatible object (only the +L<< printflush|IO::Handle/$io->printflush_(_ARGS_) >> method is used). By +default it is initially set to STDERR - although see discussion of the +L environment variable. -As getter it will lazily open a filehandle for you if one is not already set. +Invoked as a getter it will lazily open a filehandle for you if one is not +already set. =cut diff --git a/t/storage/replicated.t b/t/storage/replicated.t index 509b3e6..b735e0f 100644 --- a/t/storage/replicated.t +++ b/t/storage/replicated.t @@ -24,7 +24,6 @@ use Test::Exception; use List::Util 'first'; use Scalar::Util 'reftype'; use File::Spec; -use IO::Handle; use Moose(); use MooseX::Types(); note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Types::VERSION";