Greetings.
> I agree. Id also like to see more detail about the perceived
> weaknesses in Win32API::File. Also, id say that doing direct bindings
> against the Win API is superior to using Win32::API, although im
> probably a touch biased.
I'll just use an example. Here's the script my friend asked me to write - it
scans current directory and converts japanese filenames with Text::Kakasi to
romaji:
use Encode;
use Text::Kakasi;
use Win32::FileW;
use strict;
use warnings;
my @keys=qw(-Ha -Ka -Ja -Ea -ka -s);
my $k=Text::Kakasi->new(@keys, '-iutf8', '-outf8');
foreach my $oldname (win32api_glob('*')){
my $newname=$k->get($oldname);
if($oldname eq $newname) { next; }
unless(MoveFileW($oldname, $newname)){
win32api_print "ERR $oldname: failed to rename to $newname: $!\n";
} else {
win32api_print " OK $oldname: renamed to $newname\n";
}
}
Try rewriting it with Win32API::File.
--
Oleg "Rowaa[SR13]" V. Volkov