mojolicious / mojo-pg

Mojolicious :heart: PostgreSQL
https://metacpan.org/release/Mojo-Pg
Artistic License 2.0
99 stars 46 forks source link

Example application ends up in "provides" #7

Closed zltyfsh closed 9 years ago

zltyfsh commented 9 years ago

Just did an "carton update" for an application, and notice that Mojo::Pg ends up providing the example Blog application in the cpanfile.snapshot:

 Mojo-Pg-2.07
    pathname: S/SR/SRI/Mojo-Pg-2.07.tar.gz
    provides:
      Blog undef
      Blog::Controller::Posts undef
      Blog::Model::Posts undef
      Mojo::Pg 2.07
      Mojo::Pg::Database undef
      Mojo::Pg::Migrations undef
      Mojo::Pg::PubSub undef
      Mojo::Pg::Results undef
      Mojo::Pg::Transaction undef
    requirements:
      DBD::Pg 0
      ExtUtils::MakeMaker 0
      Mojolicious 6.0

I assume that's not the intention.

kraih commented 9 years ago

Don't think there is much we can do about that.

miyagawa commented 9 years ago
grep Mojo-Pg   ~/.cpanm/sources/http%www.cpan.org/02packages.details.txt    
Blog                              undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Blog::Controller::Posts           undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Blog::Model::Posts                undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg                           2.07  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg::Database                undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg::Migrations              undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg::PubSub                  undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg::Results                 undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz
Mojo::Pg::Transaction             undef  S/SR/SRI/Mojo-Pg-2.07.tar.gz

This is actually recognized by PAUSE as well (because cpanm, which is used internally by Carton) uses the same code to extract packages from a dist.

I recommend you to add examples directory to no_index metadata in the distribution, which will be honored by both PAUSE and cpanm.

miyagawa commented 9 years ago

(and I recommend you to abandon Blog and Blog::* namespaces on PAUSE admin screen, unless you want to be responsible for people accidentally installing the module looking for some Blog software... :D)