Data-Handle

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

 - Reworked the Exception code to be cleaner at the cost of a slight initialisatin cost.
 - Reworked code bodies to unify seek/tell calls as _restore_pos and _set_pos.
 - Added _fh so internal code is less confusing.
 - Extended tests to cover more scenarios.
 - Added contributed suggestions as "alternative_techinques" with demonstrations how they *( so far ) don't work. If
   people can get them to work (on all perls), that'd be great!. ( Seems there are many weird fdup bugs in perl )
 - Stolen the backtrace code from Carp a bit and augmented it, now produce useful backtraces.
 - Have some nice code in our exception stringification that highlights lines with colours based on how much we think
   they're related to the problem. Stuff thats part of DH ( the place the error was detected ) is highlighted green as
   we think it will be usefull in diagnosis, but its not the source of the problem. Stuff that we know is likely to be
   infrastructural and not likely to be part of the problem ( ie: code like Try::Tiny and Test::Fatal ) are highlighted
   yellow because we doubt its useful. Everything else is left white, and you should look for the problem there first.

 [Dependencies::Stats]
 - Dependencies changed since 0.01011322, see misc/*.deps* for details
 - runtime: +1
 - test: +2

0.01011322 2010-12-18T10:14:03Z
 - First version.

META.json  view on Meta::CPAN

         "recommends" : {
            "CPAN::Meta" : "2.120900",
            "ExtUtils::MakeMaker" : "7.00",
            "Test::More" : "0.99"
         },
         "requires" : {
            "Data::Dumper" : "0",
            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "IO::Handle" : "0",
            "Test::Fatal" : "0",
            "Test::More" : "0",
            "lib" : "0",
            "perl" : "5.008"
         }
      }
   },
   "provides" : {
      "Data::Handle" : {
         "file" : "lib/Data/Handle.pm",
         "version" : "1.000001"

META.yml  view on Meta::CPAN

---
abstract: 'A Very simple interface to the __DATA__  file handle.'
author:
  - 'Kent Fredric <kentnl@cpan.org>'
build_requires:
  Data::Dumper: '0'
  ExtUtils::MakeMaker: '0'
  File::Spec: '0'
  IO::Handle: '0'
  Test::Fatal: '0'
  Test::More: '0'
  lib: '0'
  perl: '5.008'
configure_requires:
  ExtUtils::MakeMaker: '0'
  perl: '5.008'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:

Makefile.PL  view on Meta::CPAN

    "overload" => 0,
    "parent" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Data::Dumper" => 0,
    "ExtUtils::MakeMaker" => 0,
    "File::Spec" => 0,
    "IO::Handle" => 0,
    "Test::Fatal" => 0,
    "Test::More" => 0,
    "lib" => 0
  },
  "VERSION" => "1.000001",
  "test" => {
    "TESTS" => "t/*.t t/00-compile/*.t t/alternative_techniques/*.t"
  }
);


Makefile.PL  view on Meta::CPAN

  "Carp" => "1.22",
  "Data::Dumper" => 0,
  "ExtUtils::MakeMaker" => 0,
  "File::Spec" => 0,
  "IO::File" => 0,
  "IO::Handle" => 0,
  "Package::Stash" => "0.15",
  "Scalar::Util" => 0,
  "Symbol" => 0,
  "Term::ANSIColor" => 0,
  "Test::Fatal" => 0,
  "Test::More" => 0,
  "Try::Tiny" => 0,
  "lib" => 0,
  "overload" => 0,
  "parent" => 0,
  "strict" => 0,
  "warnings" => 0
);


lib/Data/Handle/Exception.pm  view on Meta::CPAN


=item Green - From Data::Handle and is likely to be "safe", its where the error is being reported from,
so its useful information, but the problem is probably elsewhere.

=item Yellow - Sources we're confident its unlikely to be a source of problems, currently

=over 4

=item Try::Tiny

=item Test::Fatal

=back

=item White - Everything Else, the place the problem is most likely to be.

=back

=head1 AUTHOR

Kent Fredric <kentnl@cpan.org>

misc/built_with.json  view on Meta::CPAN

      "IO::Handle" : "1.36",
      "Package::Stash" : "0.37",
      "Pod::Coverage::TrustPod" : "0.100003",
      "Scalar::Util" : "1.46_02",
      "Software::License::Perl_5" : "0.103012",
      "Symbol" : "1.08",
      "Term::ANSIColor" : "4.06",
      "Test::CPAN::Changes" : "0.400002",
      "Test::CPAN::Meta" : "0.25",
      "Test::EOL" : "1.6",
      "Test::Fatal" : "0.014",
      "Test::Kwalitee" : "1.25",
      "Test::MinimumVersion" : "0.101082",
      "Test::More" : "1.302073",
      "Test::Pod" : "1.51",
      "Test::Pod::Coverage" : "1.10",
      "Try::Tiny" : "0.28",
      "lib" : "0.64",
      "overload" : "1.28",
      "parent" : "0.236",
      "strict" : "1.11",

t/00-report-prereqs.dd  view on Meta::CPAN

                   'recommends' => {
                                     'CPAN::Meta' => '2.120900',
                                     'ExtUtils::MakeMaker' => '7.00',
                                     'Test::More' => '0.99'
                                   },
                   'requires' => {
                                   'Data::Dumper' => '0',
                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'IO::Handle' => '0',
                                   'Test::Fatal' => '0',
                                   'Test::More' => '0',
                                   'lib' => '0',
                                   'perl' => '5.008'
                                 }
                 }
     };
  $x;
 }

t/01_lowlevel.t  view on Meta::CPAN


use strict;
use warnings;

use Test::More tests => 8;

use Test::Fatal;
use Data::Handle;

use lib 't/lib';
use Data;

my $handle;
my $e;

is(
  $e = exception {

t/02_example.t  view on Meta::CPAN


use strict;
use warnings;

use Test::More tests => 1;
use Test::Fatal;
use Data::Handle;

use lib 't/lib';
use Data;

my $output = "";

sub _diag {

  # diag(@_);

t/03_mess_with_seek.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More tests => 3;

use Test::Fatal;
use Data::Handle;

use lib 't/lib';
use Data;

my $fh = do { no strict; \*{'Data::DATA'} };
seek $fh, 10, 1;

my ( $handle, $e );

t/04_things_that_fail.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More tests => 146;

use Test::Fatal;
use Data::Handle;

my $id = 0;
our $numfails = 0;

sub checkisa {
  my ( $exception, @types ) = @_;
  my (@caller) = caller();
  my $needdiag = 0;
  local $numfails = 0;



( run in 2.113 seconds using v1.01-cache-2.11-cpan-54e63673c56 )