File-Path-Stderr

 view release on metacpan or  search on metacpan

lib/File/Path/Stderr.pm  view on Meta::CPAN

By default, if you don't request a particular import list,
C<mkpath> and C<rmpath> will be exported by default.

=cut

sub File::Path::Stderr::End::DESTORY {
  my $self = shift;
  return $self->();
}

sub _with_stdderr(&) {
  # remember what file handle was selected
  my $old = select();

  # select STDERR instead
  select(STDERR);

  # after we've returned (but before the next statement)
  # switch the file handle back to what it was before
  my $run_on_destroy = bless sub { select($old) }, "File::Path::Stderr::End";



( run in 1.138 second using v1.01-cache-2.11-cpan-49f99fa48dc )