Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^7: rename to UTF8 filename

by Anonymous Monk
on Aug 13, 2012 at 10:53 UTC ( #987094=note: print w/replies, xml ) Need Help??

in reply to Re^6: rename to UTF8 filename
in thread rename to UTF8 filename

If I don't use Path::Class, Win32::Unicode::File cannot survive on it's own. It ends up with Undefined subroutine.... when I call moveW()( How do you know that?? ).

What does that mean?

$ perl -E " use Win32::Unicode::File; use Data::Dump; dd \@Win32::Unic +ode::File::EXPORT, \&moveW ; moveW()" ( [ "file_type", "file_size", "copyW", "moveW", "unlinkW", "touchW", "renameW", "statW", "utimeW", ], sub { ... }, ) Usage: moveW(from, to [, over]) at -e line 1.

And I found the errorW(), dieW() won't work at all. Not sure if I missed something when I download this module via ppm.

You sure?

$ perl -E " use Win32::Unicode; use Data::Dump; errorW(); dd [ $@, er +rorW() ]; eval { moveW() }; dd [ $@, errorW()]; eval { moveW(qw{ . . + }) }; dd[$@, errorW()]; dieW 666;" ["", "The handle is invalid."] [ "Usage: moveW(from, to [, over]) at -e line 1.\n", "The handle is invalid.", ] ["", "The handle is invalid."] 666 at -e line 1.

But then, would you point out where absolute() and basename() method import from? I can't find it in the perldoc where the modules you used.

Path::Class gives you Path::Class::File and Path::Class::Dir objects

$ perl -MPath::Class -E " say file(1) " 1 $ perl -MPath::Class -E " say ref file(1) " Path::Class::File $ perl -MPath::Class -MData::Dump -E " dd file(1) " bless({ dir => undef, file => 1, file_spec_class => undef }, "Path::Cl +ass::File") $ perl -MPath::Class -E " say file(1)->basename " 1 $

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987094]
and nobody stirs...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2018-05-22 22:02 GMT
Find Nodes?
    Voting Booth?