NAME
    Dir::Rename::WD - Rename current working directory

VERSION
    This document describes version 0.001 of Dir::Rename::WD (from Perl
    distribution Dir-Rename-WD), released on 2026-04-28.

SYNOPSIS
     use Dir::Rename::WD qw(rename_wd);

     rename_wd "newname" or die "Can't rename working directory: $!";

DESCRIPTION
    This module provides a single routine to change working directory then
    put the process back to the newly renamed working directory. Basically
    to do this, we change directory up one level first, then change into the
    directory after the rename.

FUNCTIONS
  rename_wd
    Usage:

     rename_wd $newname

    Rename current working directory. Takes a single argument (will set $!
    to "EINVAL" if argument not supplied or extra arguments are supplied).

    Return true on success, false otherwise (check $! for error detail).
    Failing also include case when directory has been renamed but we cannot
    change back into it e.g. due to permission problem like directory not
    having execute bit set.

    Root directory cannot be renamed (will set $! to "EBUSY").

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/Dir-Rename-WD>.

SOURCE
    Source repository is at
    <https://github.com/perlancar/perl-Dir-Rename-WD>.

SEE ALSO
    renwd from App::renwd provides a CLI for this routine.

    renlikewd from App::renlikewd which provides tab completion for renaming
    current directory on the CLI.

AUTHOR
    perlancar <perlancar@cpan.org>

CONTRIBUTING
    To contribute, you can send patches by email/via RT, or send pull
    requests on GitHub.

    Most of the time, you don't need to build the distribution yourself. You
    can simply modify the code, then test via:

     % prove -l

    If you want to build the distribution (e.g. to try to install it locally
    on your system), you can install Dist::Zilla,
    Dist::Zilla::PluginBundle::Author::PERLANCAR,
    Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two
    other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps
    required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE
    This software is copyright (c) 2026 by perlancar <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.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    <https://rt.cpan.org/Public/Dist/Display.html?Name=Dir-Rename-WD>

    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.

