houseabsolute / DateTime-TimeZone

Time zone object base class and factory
https://metacpan.org/release/DateTime-TimeZone/
Other
9 stars 25 forks source link

CONTRIBUTING.md: TidyAll instructions insufficient #29

Closed jkeenan closed 2 months ago

jkeenan commented 6 years ago

Today, in the course of working on a separate issue/p.r. for this repository, I had reason to read CONTRIBUTING.md and followed its instructions:

## TidyAll

This distribution uses
[Code::TidyAll](https://metacpan.org/release/Code-TidyAll) to enforce a
uniform coding style. This is tested as part of the author testing suite. You
can install and run tidyall by running the following commands:

    $ cpanm Code::TidyAll
    $ tidyall -a

Please run this before committing your changes and address any issues it
brings up.

Once I called tidyall -a, those instructions were revealed to be incomplete. I got the following:

$ tidyall -a
could not load plugin class 'Code::TidyAll::Plugin::SortLines::Naturally': Can't locate Code/TidyAll/Plugin/SortLines/Naturally.pm in @INC (you may need to install the Code::TidyAll::Plugin::SortLines::Naturally module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.26 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.26/mach /usr/local/lib/perl5/5.26) at /usr/local/lib/perl5/site_perl/Module/Runtime.pm line 314.

$ tidyall -a
could not load plugin class 'Code::TidyAll::Plugin::Test::Vars': Can't locate Code/TidyAll/Plugin/Test/Vars.pm in @INC (you may need to install the Code::TidyAll::Plugin::Test::Vars module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.26 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.26/mach /usr/local/lib/perl5/5.26) at /usr/local/lib/perl5/site_perl/Module/Runtime.pm line 314.

So I had to make two additional, separate calls to cpan before I could get the tidying to work. This documentation should be corrected.

Thank you very much. Jim Keenan

autarch commented 6 years ago

There's a request to add tidyall --listdeps command that would make this simpler. See https://github.com/houseabsolute/perl-code-tidyall/issues/89.

Then the instructions would just say:

$ cpanm Code::TidyAll
$ cpanm $(tidyall --listdeps)
$ tidyall -a

Without the listdeps command the dzil plugin that generates this CONTRIBUTING.md file would need to determine the deps itself, which seems like wasted effort. I'm hoping that @oalders will feel inspired to implement this sometime soon ;)

autarch commented 2 months ago

The distro no longer uses tidyall, so I'll close this.