Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IO-All CPAN distribution.

Report information
The Basics
Id: 26098
Status: resolved
Priority: 0/
Queue: IO-All

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.33
  • 0.34
  • 0.35
  • 0.36
  • 0.37
  • 0.38
Fixed in: (no value)



Subject: [PATCH] Allow any *DBM_File to work for IO::All testing
The test suite for IO::All is hard-coded to use SDBM_File, and hence fails if SDBM_File is not built. That attached patch lets testing proceed by using any *DBM_File (or DB_File) that is found.
Subject: io_all_dbm.patch
--- t/dbm.t.orig 2007-04-04 10:20:18.000000000 -0400 +++ t/dbm.t 2007-04-04 10:25:36.000000000 -0400 @@ -1,11 +1,26 @@ use lib 't', 'lib'; use strict; use warnings; -use Test::More tests => 2; + +my $db_file; +BEGIN { + use Config; + foreach (qw/SDBM_File GDBM_File ODBM_File NDBM_File DB_File/) { + if ($Config{extensions} =~ /\b$_\b/) { + $db_file = $_; + last; + } + } +} + +use Test::More defined($db_file) + ? (tests => 2) + : (skip_all => 'No DMB modules available'); + use IO::All; use IO_All_Test; -my $db = io('t/output/mydbm')->dbm('SDBM_File'); +my $db = io('t/output/mydbm')->dbm($db_file); $db->{fortytwo} = 42; $db->{foo} = 'bar';
On Wed Apr 04 10:32:25 2007, JDHEDDEN wrote: Show quoted text
> The test suite for IO::All is hard-coded to use SDBM_File, and hence > fails if SDBM_File is not built. That attached patch lets testing > proceed by using any *DBM_File (or DB_File) that is found.
Fixed in git, will be in the next release. Thanks!