nysus has asked for the wisdom of the Perl Monks concerning the following question:

Poring through docs and several Google searches have turned up nothing on how to insert Package::Name into a file using template variables on files in my profile's skeleton directory using the [GatherDir::Template] plugin directive. You can use {{$dist->name}} but that inserts the package names with dashes: Package-Name. Using {{$name}} returns an empty string. I looked through the $dist object and that didn't have anything.

Seems kind of hard to believe this can't be easily done. Figured I'd check with the Monks to see if I'm missing something obvious. 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

Replies are listed 'Best First'.
Re: Possible to add Package::Name with Dist::Zilla "GatherDir" plugin?
by nysus (Parson) on Feb 05, 2018 at 03:23 UTC

    SOLVED:

    {{$dist->name =~ s/-/::/gr}}

    Didn't know you could put perl code in those braces.

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

      Eewwww :p

      ive noticed the last handful of rzil questions you ansered yourself... They've been quite impenetrable dz