File::Touch module error

D

Domenico Discepola

Hello. I'm trying to use the File::Touch module and I get the error below.
I'm using Activestate 5.8.2. Build 808 on Windows XP. Any thoughts?

TIA

##########
#!perl
use strict;
use warnings;
use diagnostics;
use File::Touch;

my $result = File::Touch::touch('a.txt');

exit 0;
############

Uncaught exception from user code:
Your vendor has not defined Fcntl macro O_NONBLOCK, used at
C:/Perl/site/lib/File/Touch.pm line 92.
Fcntl::AUTOLOAD() called at C:/Perl/site/lib/File/Touch.pm line 92
File::Touch::touch('a.txt') called at p4.pl line 7
 
K

ko

Domenico said:
Hello. I'm trying to use the File::Touch module and I get the error below.
I'm using Activestate 5.8.2. Build 808 on Windows XP. Any thoughts?

TIA

##########
#!perl
use strict;
use warnings;
use diagnostics;
use File::Touch;

my $result = File::Touch::touch('a.txt');

exit 0;

[snip error message]

If all you need is the default behavior, you can touch one or more files
with a one-liner:

perl -MExtUtils::Command -e touch FILE1 FILE2 ...

Because ExtUtils::Command::touch() takes input from @ARGV, you need to
do something like this to use in a script:

#!/usr/bin/perl -w
use strict;
use ExtUtils::Command();

my @files = qw[one two three];
touch( @files );

sub touch {
local @ARGV = @_;
ExtUtils::Command::touch();
}
__END__

ExtUtils::Command is a standard module.

HTH - keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top