fayland / perl-Dist-Zilla-Plugin-GitHubREADME-Badge

Dist::Zilla - add badges to github README.md
Other
6 stars 10 forks source link

Can't locate object method "path" via package "Path::Class::Dir" #14

Closed oalders closed 8 years ago

oalders commented 8 years ago

Full error is

Can't locate object method "path" via package "Path::Class::Dir" at /home/travis/perl5/perlbrew/perls/5.20.3/lib/site_perl/5.20.3/Dist/Zilla/Plugin/GitHubREADME/Badge.pm line 56.

See https://travis-ci.org/plu/Pithub/jobs/159729350#L452

Conversation from #dzil:

[12:54:04]  <oalders>   is this line wrong? https://metacpan.org/source/FAYLAND/Dist-Zilla-Plugin-GitHubREADME-Badge-0.17/lib/Dist/Zilla/Plugin/GitHubREADME/Badge.pm#L56
[12:54:06]  <dipsy> [ lib/Dist/Zilla/Plugin/GitHubREADME/Badge.pm - metacpan.org ] 
[12:54:59]  <oalders>   For some reason it seems not to trigger a build failure under 5.21, but the other Pithub builds are failing https://travis-ci.org/plu/Pithub/builds/157545506
[12:55:09]  <dipsy> [ Travis CI - Test and Deploy Your Code with Confidence ] 
[12:56:06]  <%ether>    oalders: are you trying to edit the files in the repo, or the build?
[12:56:27]  <%ether>    ->root is pointing to the repo source
[12:56:54]  <%ether>    if you want to edit files in the build, you want to look for a matching ->name in @{$self->zilla->files}
[12:57:13]  <%ether>    but in that case, after_build or after_release is the wrong phase anyway
[12:57:32]  <oalders>   that's a good question. i'm just trying to chase down a bug that appeared in the Pithub builds
[12:58:04]  <oalders>   so it looks like that plugin is buggy?
[12:58:51]  <%ether>    if I were writing this, I'd edit the files in the build, and then use CopyFilesFrom(Build|Release) to update the repo
[12:59:11]  <oalders>   ether: thanks! i'll open an issue
[13:00:12]  <%ether>    it's possible the code isn't working for you if you have Dist::Zilla 5.x, not 6.x (where the interfaces to the file objects changed)
[13:00:20]  <%ether>    I don't think  $zillafile->path is going to work on 5.
[13:00:22]  <%ether>    er 5.x
[13:01:45]  <%ether>    oh! if you are *already* using CopyFilesFrom*, then that plugin might be clobbering the edits this plugin did
[13:02:02]  <%ether>    which is another reason to edit the dist files, so everyone's changes get combined rather than fighting with each other
oalders commented 8 years ago

Thanks! Pithub builds are passing again. https://travis-ci.org/plu/Pithub/builds/159729348