Subject: | inconsistent chdir between Test::Cmd::Common and Test::Cmd |
There appears to be an inconsistency between the changing of directories when calling Test::Cmd::Common::new versus Test::Cmd::new.
Test::Common::new changes the working directory per the 'working_dir' definition but it doesn't store the current working directory in $self->{'cwd'} like Test::Cmd::new. This means when $self->cleanup() is called in a script it won't change directory back to the original cwd.
Looking at Common::new & Cmd::new I see that the problem is more subtle than I've described above but you get the idea. Essentially, it should still be possibly to revert back to the original cwd when cleanup() is called in an object created by Test::Common::new().