Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't use vars, use our #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/File/chdir.pm
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package File::chdir;
use 5.004;
use 5.006;
use strict;
use vars qw($VERSION @ISA @EXPORT $CWD @CWD);
# ABSTRACT: a more sensible way to change directories

our $VERSION = '0.1012';

require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(*CWD);
our @ISA = qw(Exporter);
our @EXPORT = qw(*CWD);

use Carp;
use Cwd 3.16;
use File::Spec::Functions 3.27 qw/canonpath splitpath catpath splitdir catdir/;

tie $CWD, 'File::chdir::SCALAR' or die "Can't tie \$CWD";
tie @CWD, 'File::chdir::ARRAY' or die "Can't tie \@CWD";
tie our $CWD, 'File::chdir::SCALAR' or die "Can't tie \$CWD";
tie our @CWD, 'File::chdir::ARRAY' or die "Can't tie \@CWD";

sub _abs_path {
# Otherwise we'll never work under taint mode.
Expand Down