Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > File::Touch module error

Reply
Thread Tools

File::Touch module error

 
 
Domenico Discepola
Guest
Posts: n/a
 
      01-27-2004
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


 
Reply With Quote
 
 
 
 
ko
Guest
Posts: n/a
 
      01-28-2004
Domenico Discepola wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: module docstring, documentation,anything? please note is the module type/object NOT some module Maric Michaud Python 0 06-24-2006 12:42 PM
Raise Error in a Module and Try/Except in a different Module Issa-Ahmed SIDIBE Python 4 04-04-2005 10:34 AM
Re: Http Module Problem: not all requests hit my module why? Jiong Feng ASP .Net 2 11-29-2003 05:14 PM
Python-2.3b1 bugs on Windows2000 with: the new csv module, stringreplace, and the re module Daniel Ortmann Python 4 07-02-2003 03:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57