Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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 $


Comment on Re^7: rename to UTF8 filename
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987094]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-18 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (111 votes), past polls