NAME File::Unsaved - Check whether file has unsaved modification in an editor VERSION This document describes version 0.01 of File::Unsaved (from Perl distribution File-Unsaved), released on 2014-10-09. SYNOPSIS use File::Unsaved qw(check_file_unsaved); die "Can't modify foo.txt because it is being opened and modified in an editor" if check_file_unsaved(path => "foo.txt"); DESCRIPTION FUNCTIONS check_unsaved_file(%args) -> any Check whether file has unsaved modification in an editor. This function tries, using some heuristics, to find out if a file is being opened and has unsaved modification in an editor. Currently the supported editor is Emacs. Return false if no unsaved data is detected, or else a hash structure. Hash will contain these keys: "editor" (kind of editor). The heuristics are as folow: * Emacs: check whether ".#" (symlink) exists. Arguments ('*' denotes required arguments): * path* => *str* Return value: (any) SEE ALSO HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 2014 by perlancar@cpan.org. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.