File::HomeDir::Win32 - Find home directories on Win32 systems
use File::HomeDir::Win32; print "My dir is ",home()," and root's is ",home('Administrator'),"\n";
This module provides routines for finding home directories on Win32 systems. It was designed as a companion to File::HomeDir that overrides the existing home function, which does not properly locate home directories on Windows machines.
home
To use both modules together:
use File::HomeDir; BEGIN { if ($^O eq "MSWin32") { eval { require File::HomeDir::Win32; File::HomeDir::Win32->import(); }; die "$@" if ($@); } }
or (if you have the if module),
use File::HomeDir; use if ($^O eq "MSWin32"), "File::HomeDir::Win32";
The home function should work as normal.
On systems with no profiles, such as Windows 98, or in cases where it cannot find profiles, it will not override File::HomeDir. (In such cases it will die if File::HomeDir is not loaded.)
File::HomeDir
Robert Rothenberg <rrwo at cpan.org>
Current maintainer: Randy Kobes <r.kobes at uwinnipeg.ca>
Feedback is always welcome. Please use the CPAN Request Tracker at http://rt.cpan.org to submit bug reports.
Copyright (c) 2005 Robert Rothenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install File::HomeDir::Win32, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::HomeDir::Win32
CPAN shell
perl -MCPAN -e shell install File::HomeDir::Win32
For more information on module installation, please visit the detailed CPAN module installation guide.