Show
Ignore:
Timestamp:
08/28/08 11:59:19 (6 years ago)
Author:
zigorou
Message:

Change to Carp::Clan::croak from die

Location:
lang/perl/DBIx-Printf/trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/DBIx-Printf/trunk

    • Property svn:ignore set to
      MANIFEST
  • lang/perl/DBIx-Printf/trunk/Changes

    r9300 r18370  
    11Revision history for Perl extension DBIx::Printf. 
     2 
     30.07  Thu Aug 28 11:44:15 2008 
     4        - Change to Carp::Clan::croak from die. 
    25 
    360.06  Thu Dec 20 18:08:42 2007 
  • lang/perl/DBIx-Printf/trunk/Makefile.PL

    r3361 r18370  
    88 
    99requires('DBI'); 
     10requires('Carp::Clan'); 
    1011 
    1112build_requires('DBD::Mock'); 
  • lang/perl/DBIx-Printf/trunk/lib/DBIx/Printf.pm

    r3361 r18370  
    33 
    44use DBI; 
     5use Carp::Clan; 
    56 
    67package main; 
     
    1011     
    1112    my $sql = DBIx::Printf::_printf($dbh, $fmt, \@params); 
    12     die "too many parameters\n" if @params; 
     13    Carp::Clan::croak "too many parameters\n" if @params; 
    1314    $sql; 
    1415} 
     
    1617package DBIx::Printf; 
    1718 
    18 our $VERSION = 0.06; 
     19our $VERSION = 0.07; 
    1920 
    2021sub _printf { 
     
    5455    my ($dbh, $type, $params, $in_like) = @_; 
    5556     
    56     die "too few parameters\n" unless @$params; 
     57    Carp::Clan::croak "too few parameters\n" unless @$params; 
    5758    my $param = shift @$params; 
    5859     
     
    6566        $param = $dbh->quote($param); # be paranoiac, use DBI::db::quote 
    6667        $param =~ s/^'(.*)'$/$1/s 
    67             or die "unexpected quote char used: $param\n"; 
     68            or Carp::Clan::croak "unexpected quote char used: $param\n"; 
    6869    } elsif ($type eq 's') { 
    6970        if ($in_like) { 
     
    7374        if ($in_like) { 
    7475            $param =~ s/^'(.*)'$/$1/s 
    75                 or die "unexpected quote char: $param\n"; 
     76                or Carp::Clan::croak "unexpected quote char: $param\n"; 
    7677        } 
    7778    } elsif ($type eq 't') { 
    7879        # pass thru 
    7980    } else { 
    80         die "unexpected type: $type\n"; 
     81        Carp::Clan::croak "unexpected type: $type\n"; 
    8182    } 
    8283