NAME

Win32::Symlinks - A maintained, working implementation of Perl symlink built in features for Windows.

VERSION

Version 0.12

SYNOPSIS

This module enables, on Windows, symlink related Perl features that don't work by default on Windows.

Specifically, it enables the functionality that you would see on *nix OSes, for -l $filename, symlink, readlink and unlink.

This features have never properly been ported to Windows by the Perl development team. They were initially unimplemented due to the limitations that Windows used to have prior to NTFS (e.g. when Windows used Fat32 as main file system).

That situation has been different for at least two decades now. Yet, Perl continues to keep these functions unimplemented on Windows.

The aim of this module is to allow Perl code to use -l $filename, symlink, readlink and unlink seamlessly between *nix and Windows. Just by using the module, it will do its best effort to make these functions work exactly the same and as they are expected to work.

The module doesn't do anything if it is run on a *nix machine, it defaults to the built in functions. But, by being present in your code, you'll ensure these functions don't break when being executed in a Windows based Perl distribution.

Perhaps a little code snippet.

use Win32::Symlinks;

# That's it. Now symlink, readlink, unlink and -l will work correctly when
# executed under Windows.

# Also, you don't need to call it everywhere. Calling it once is enough.
  
  

EXPORT

Only when running under Windows, the built in functions symlink, readlink and unlink, as well as the file test -l, are overriden.

If at some point you really need to make sure you are calling the built in function, you should explicitly use the CORE prefix (e.g. CORE::readlink($file)).

When running on any OS that is *not* Windows, it will default to the built in Perl functions. This module doesn't do anything on non Windows platforms, which makes it perfect if you are working on a non Windows machine but want to make sure your symlink related functions will not break under Windows.

AUTHOR

Francisco Zarabozo, <zarabozo at cpan.org>

BUGS

I'm sure there are many that I haven't been able to trigger. If you find a bug, please don't hesitate to report it. I promise I will make an effort to have it resolved ASAP.

Take into account that this implementation can only work on NTFS file systems. Symlinks are not implemented in file systems like FAT32. Windows has been using NTFS since Windows 2000, but it used FAT32 for Windows 95, 98, Millenium, etc.

Also, external devices like USB sticks, SD cards, etc., are generally formatted with FAT32 or ExFAT. So, if you try to use these functions over such devices, it will fail, unless you format them with the NTFS file system first.

Please report any bugs or feature requests to bug-win32-symlinks at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Win32-Symlinks. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Win32::Symlinks

You can also look for information at:

ACKNOWLEDGEMENTS

A small part of C code was taken from the Win32_Links project from Jlevens, which has a GNU v2.0 license and can be found at Github.

LICENSE AND COPYRIGHT

This software is copyright (c) 2021 by Francisco Zarabozo.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.