-
Notifications
You must be signed in to change notification settings - Fork 9
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
autodie is incompatible with Test::MockFile #44
Comments
On load of Test::MockFile, we need to die if we detect $INC{'autodie.pm'}. |
@toddr: That seems a pretty aggressive approach. It assumes one part of a test won’t use the mock and another won’t use a temp directory. Is it possible to work with it if there is “no autodie” local to the T::MF usage? |
I would have to provide an unimport and so would autodie if it doesn't already. That's a perfectly good phase 2 but that'd be a lot of work. |
Another problem with the idea of making |
another example
|
It may be better to wait until Leon’s autocroak module is usable than to try to fix this. |
https://github.com/cpanel/p5-Filesys-Restrict (private repo) would also address this, perhaps more neatly. |
Im wondering if this needs some effort to work with autodie and similar tools. More and more code we see is using patterns similar to autodie. Being able to mock the filesystem is much nicer than using a temp folder. There has got to be a way to patch autodie to work with these mocks when Test::MockFile sees autodie or similar is loaded. |
The text was updated successfully, but these errors were encountered: