r32324 - in /branches/upstream/libfile-touch-perl/current: ._Makefile.PL ._test.pl Changes META.yml Touch.pm
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Wed Mar 25 01:16:00 UTC 2009
Author: ryan52-guest
Date: Wed Mar 25 01:15:56 2009
New Revision: 32324
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=32324
Log:
[svn-upgrade] Integrating new upstream version, libfile-touch-perl (0.06)
Added:
branches/upstream/libfile-touch-perl/current/._Makefile.PL (with props)
branches/upstream/libfile-touch-perl/current/._test.pl (with props)
Modified:
branches/upstream/libfile-touch-perl/current/Changes
branches/upstream/libfile-touch-perl/current/META.yml
branches/upstream/libfile-touch-perl/current/Touch.pm
Added: branches/upstream/libfile-touch-perl/current/._Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-touch-perl/current/._Makefile.PL?rev=32324&op=file
==============================================================================
Binary file - no diff available.
Propchange: branches/upstream/libfile-touch-perl/current/._Makefile.PL
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/upstream/libfile-touch-perl/current/._test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-touch-perl/current/._test.pl?rev=32324&op=file
==============================================================================
Binary file - no diff available.
Propchange: branches/upstream/libfile-touch-perl/current/._test.pl
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: branches/upstream/libfile-touch-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-touch-perl/current/Changes?rev=32324&op=diff
==============================================================================
--- branches/upstream/libfile-touch-perl/current/Changes (original)
+++ branches/upstream/libfile-touch-perl/current/Changes Wed Mar 25 01:15:56 2009
@@ -1,5 +1,9 @@
Revision history for Perl extension File::Touch.
+0.06 Tue Mar 24 11:22:13 2009
+ - now works on systems lacking O_NONBLOCK
+ (thanks Ronald Fischer)
+ - BUG: no longer works adds O_NOCTTY with terminal devices
0.02 Thu Jun 1 08:48:56 2007
- fixed bareword filehandle (thanks Tolga Ceylan)
- I changed my name
Modified: branches/upstream/libfile-touch-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-touch-perl/current/META.yml?rev=32324&op=diff
==============================================================================
--- branches/upstream/libfile-touch-perl/current/META.yml (original)
+++ branches/upstream/libfile-touch-perl/current/META.yml Wed Mar 25 01:15:56 2009
@@ -1,11 +1,10 @@
---- #YAML:1.0
-name: File-Touch
-version: 0.02
-abstract: ~
-license: ~
-generated_by: ExtUtils::MakeMaker version 6.32
-distribution_type: module
-requires:
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: File-Touch
+version: 0.06
+version_from: Touch.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: branches/upstream/libfile-touch-perl/current/Touch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-touch-perl/current/Touch.pm?rev=32324&op=diff
==============================================================================
--- branches/upstream/libfile-touch-perl/current/Touch.pm (original)
+++ branches/upstream/libfile-touch-perl/current/Touch.pm Wed Mar 25 01:15:56 2009
@@ -3,13 +3,39 @@
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(touch);
-$VERSION = "0.02";
+$VERSION = "0.06";
use warnings;
use strict;
use Carp;
use IO::File;
use File::stat;
+use Fcntl;
+
+my $SYSOPEN_MODE = O_WRONLY|O_CREAT;
+eval {
+ $SYSOPEN_MODE |= &{ $Fcntl::{'O_NONBLOCK'} };
+};
+if($@) {
+ if($@ =~ /Your vendor has not defined/) {
+ # OK, we don't have O_NONBLOCK:
+ # probably running on Windows.
+ } else {
+ die "$@"; # Rethrow exception, must be something different
+ }
+}
+
+
+
+
+
+foreach my $Fcntl_sym (keys %Fcntl::){
+ if($Fcntl_sym eq 'O_NONBLOCK'){
+ $SYSOPEN_MODE |= &{ $Fcntl::{'O_NONBLOCK'} };
+ last;
+ }
+}
+
sub new
{
@@ -89,7 +115,7 @@
$mtime = $sb->mtime;
} else {
unless ($self->{_no_create}){
- sysopen my $fh,$file,O_WRONLY|O_CREAT|O_NONBLOCK|O_NOCTTY or croak("Can't create $file : $!");
+ sysopen my $fh,$file,$SYSOPEN_MODE or croak("Can't create $file : $!");
close $fh or croak("Can't close $file : $!");
$atime = $time;
$mtime = $time;
@@ -199,7 +225,7 @@
=head1 COPYRIGHT
-Copyright (c) 2001,2007 Nigel Wetters Gourlay. All Rights Reserved.
+Copyright (c) 2001,2007,2009 Nigel Wetters Gourlay. All Rights Reserved.
This module is free software. It may be used, redistributed
and/or modified under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list