[Bps-public-commit] cpan2rt branch, deploy, updated. deployed-4-gfa4fdb2

Thomas Sibley trs at bestpractical.com
Mon Apr 1 19:02:46 EDT 2013


The branch, deploy has been updated
       via  fa4fdb2f19842a497a22d7d91cb853be985521e9 (commit)
      from  4be4c513fd0402f41a530d231efd82d9e78d7986 (commit)

Summary of changes:
 lib/CPAN2RT.pm | 3 +++
 1 file changed, 3 insertions(+)

- Log -----------------------------------------------------------------
commit fa4fdb2f19842a497a22d7d91cb853be985521e9
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Apr 1 16:01:57 2013 -0700

    The datadir not existing is a fatal error
    
    Catch and report it early to avoid more confusing errors later.

diff --git a/lib/CPAN2RT.pm b/lib/CPAN2RT.pm
index 50f9042..67536c8 100644
--- a/lib/CPAN2RT.pm
+++ b/lib/CPAN2RT.pm
@@ -68,6 +68,9 @@ See options in description of L</new>.
 sub init {
     my $self = shift;
 
+    die "datadir ($self->{datadir}) doesn't exist!\n"
+        if $self->{datadir} and not -d $self->{datadir};
+
     my $home = ($self->{'home'} ||= $ENV{'RTHOME'} || '/opt/rt3');
     unshift @INC, File::Spec->catdir( $home, 'lib' );
     unshift @INC, File::Spec->catdir( $home, 'local', 'lib' );

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list