houseabsolute / perl-code-tidyall

Engine for tidyall, your all-in-one code tidier and validator
https://metacpan.org/release/Code-TidyAll/
Other
21 stars 31 forks source link

Error with custom data_dir in 0.52 #66

Closed mgruner closed 7 years ago

mgruner commented 8 years ago

When passing in a custom data_dir (as a string, of course) as suggested in the documentation to new_from_conf_file, Code::TidyAll will cause a Perl error:

Can't locate object method "child" via package "/var/folders/85/z186m29d7zbgb6tx8sqxhvhr0000gn/T" (perhaps you forgot to load "/var/folders/85/z186m29d7zbgb6tx8sqxhvhr0000gn/T"?) at /Library/Perl/5.18/Code/TidyAll.pm line 58.

This is because _build_backup_dir() calls $self->data_dir->child('backups') which dies if data_dir is a scalar. Workaround: also set no_backups => 1 flag in the parameters.

autarch commented 8 years ago

I'm working on this. I hope to have a release out this weekend at the latest.

autarch commented 8 years ago

Well, that didn't happen. I will keep working on this. I'm trying to get Code::TidyAll to use Specio types with coercions, but there is some sort of bug in Specio or Moo that I need to understand.