Updated Compress-Raw-Zlib to CPAN version 2.035
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Wed, 18 May 2011 19:16:42 +0000 (20:16 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 9 Jun 2011 11:17:09 +0000 (12:17 +0100)
  [DELTA]

  2.035 6 May 2011

      * No Changes

Porting/Maintainers.pl
cpan/Compress-Raw-Zlib/Changes
cpan/Compress-Raw-Zlib/README
cpan/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
cpan/Compress-Raw-Zlib/t/compress/CompTestUtils.pm

index fb530ca..9b01a6e 100755 (executable)
@@ -381,7 +381,7 @@ use File::Glob qw(:case);
     'Compress::Raw::Zlib' =>
        {
        'MAINTAINER'    => 'pmqs',
-       'DISTRIBUTION'  => 'PMQS/Compress-Raw-Zlib-2.033.tar.gz',
+       'DISTRIBUTION'  => 'PMQS/Compress-Raw-Zlib-2.035.tar.gz',
 
        'FILES'         => q[cpan/Compress-Raw-Zlib],
        'EXCLUDED'      => [ qr{^t/Test/},
index ebc9171..9282cc4 100644 (file)
@@ -1,6 +1,10 @@
 CHANGES
 -------
 
+  2.035 6 May 2011
+
+      * No Changes
+
   2.033 11 Jan 2011
       * Fixed typos & spelling errors.
         [perl# 81782]
index 122d32d..b42a4d4 100644 (file)
@@ -1,9 +1,9 @@
 
                              Compress-Raw-Zlib
 
-                             Version 2.033
+                             Version 2.035
 
-                             11th January 2011
+                               6th May 2011
 
        Copyright (c) 2005-2011 Paul Marquess. All rights reserved.
           This program is free software; you can redistribute it
@@ -355,7 +355,7 @@ To help me help you, I need all of the following information:
         If you haven't installed Compress-Raw-Zlib then search Compress::Raw::Zlib.pm
         for a line like this:
 
-          $VERSION = "2.033" ;
+          $VERSION = "2.035" ;
 
      c. The version of zlib you have used.
         If you have successfully installed Compress-Raw-Zlib, this one-liner
index 8b17dcc..4a0f2da 100644 (file)
@@ -13,7 +13,7 @@ use warnings ;
 use bytes ;
 our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
 
-$VERSION = '2.033';
+$VERSION = '2.035';
 $XS_VERSION = $VERSION; 
 $VERSION = eval $VERSION;
 
index f21045d..644a618 100644 (file)
@@ -25,6 +25,14 @@ sub like_eval
     like $@, @_ ;
 }
 
+BEGIN {
+    eval { 
+       require File::Temp;
+     } ;
+
+}
+
+
 {
     package LexFile ;
 
@@ -36,8 +44,9 @@ sub like_eval
         my $self = shift ;
         foreach (@_)
         {
-            # autogenerate the name unless if none supplied
-            $_ = "tst" . $index ++ . ".tmp"
+            Carp::croak "NO!!!!" if defined $_;
+            # autogenerate the name if none supplied
+            $_ = "tst" . $$ . "X" . $index ++ . ".tmp"
                 unless defined $_;
         }
         chmod 0777, @_;
@@ -58,19 +67,58 @@ sub like_eval
     package LexDir ;
 
     use File::Path;
+
+    our ($index);
+    $index = '00000';
+    our ($useTempFile) = defined &File::Temp::tempdir;
+    our ($useTempDir) = defined &File::Temp::newdir;
+    
     sub new
     {
         my $self = shift ;
-        foreach (@_) { rmtree $_ }
-        bless [ @_ ], $self ;
+
+        if ( $useTempDir)
+        {
+            foreach (@_)
+            {
+                Carp::croak "NO!!!!" if defined $_;
+                $_ = File::Temp->newdir(DIR => '.');
+            }
+            bless [ @_ ], $self ;
+        }
+        elsif ( $useTempFile)
+        {
+            foreach (@_)
+            {
+                Carp::croak "NO!!!!" if defined $_;
+                $_ = File::Temp::tempdir(DIR => '.', CLEANUP => 1);
+            }
+            bless [ @_ ], $self ;
+        }
+        else
+        {
+            foreach (@_)
+            {
+                Carp::croak "NO!!!!" if defined $_;
+                # autogenerate the name if none supplied
+                $_ = "tmpdir" . $$ . "X" . $index ++ . ".tmp" ;
+            }
+            foreach (@_) { rmtree $_; mkdir $_, 0777 }
+            bless [ @_ ], $self ;
+        }
+
     }
 
     sub DESTROY
     {
-        my $self = shift ;
-        foreach (@$self) { rmtree $_ }
+        if (! $useTempFile)
+        {
+            my $self = shift ;
+            foreach (@$self) { rmtree $_ }
+        }
     }
 }
+
 sub readFile
 {
     my $f = shift ;