in reply to Dist::Zilla Tutorial for beginners

Personally, as a prolific CPAN distribution author and someone who has written a piece of automated test software that has to deal with Dist::Zilla distributions, I'll say that your efforts are valiant, but I despise the software.

It requires so many additional pieces to be installed, it's mind-boggling.

The requirements to install a dist-zilla install reaches far beyond the requirements I demand in all of my dists, combined.

Yes, it's a fascinating piece of work, but it doesn't follow the "do one thing, and do one thing good" rule.

You've done a good job selling it, but it is a bit long-winded.

I would recommend that instead of focusing on dealing with your installer, you work on your own code instead.

My personal opinion.

-stevieb

ps, for what it's worth.

sub _dzil_shim { # shim for working on Dist::Zilla modules my ($self, $cmd_file) = @_; # return early if possible return if -e 'Build.PL' || -e 'Makefile.PL'; return if ! -e 'dist.ini'; my $log = $log->child('_dzil_shim'); $log->_5("dzil dist... loading the shim"); my $path_sep = $self->is_win ? ';' : ':'; if (! grep {-x "$_/dzil"} split /$path_sep/, $ENV{PATH} ){ $log->fatal( "this appears to be a Dist::Zilla module, but the dzil bin +ary " . "can't be found\n" ); } $self->{is_dzil} = 1; open my $fh, '<', 'dist.ini' or croak $!; my ($dist, $version); while (<$fh>){ if (/${ re_brewbuild('extract_dzil_dist_name') }/){ $dist = $1; } if (/${ re_brewbuild('extract_dzil_dist_version') }/){ $version = $1; } last if $dist && $version; } $log->_7("running dzil commands: 'dzil authordeps --missing | cpan +m', " . "'dzil build'" ); `dzil authordeps --missing | cpanm`; `dzil clean`; `dzil build`; my $dir = "$dist-$version"; copy $cmd_file, $dir if defined $cmd_file; chdir $dir; $log->_7("entered $dir directory"); } sub _dzil_unshim { # unshim after doing dzil work my $self = shift; my $log = $log->child('_dzil_unshim'); if (! $self->{is_dzil}){ $log->_7("not a dzil distribution; nothing to do"); return; } $log->_5("removing dzil shim"); $self->{is_dzil} = 0; chdir '..'; $log->_7("changed to '..' dir"); }

Replies are listed 'Best First'.
Re^2: Dist::Zilla Tutorial for beginners
by nysus (Parson) on Sep 24, 2018 at 15:19 UTC

    Everything you say could be true. I'm not qualified to say but I will definitely take it into consideration. I still find personal value in trying to unravel how this system of modules works. I will definitely try to address your concerns and explain the downside of Dist::Zilla as I learn more about them. Thanks!

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks