For me, updating the manifest is pretty much standard procedure whenever i add or remove files from one of my projects. As for updating version numbers and stuff, i also have scripts for that.

setversion.pl:

#!/usr/bin/env perl #---AUTOPRAGMASTART--- use 5.020; use strict; use warnings; use diagnostics; use mro 'c3'; use English; use Carp; our $VERSION = 18; use autodie qw( close ); use Array::Contains; use utf8; use Encode qw(is_utf8 encode_utf8 decode_utf8); #---AUTOPRAGMAEND--- # PAGECAMEL (C) 2008-2020 Rene Schickbauer # Developed under Artistic license my $newversion = shift @ARGV || "???"; if($newversion eq "???") { print "Usage: perl devscripts/setversion.pl 9.87\n"; exit(0); } print "Searching files...\n"; my @files = (find_pm('lib'), find_pm('devscripts'), find_pm('example') +); print "Changing files:\n"; foreach my $file (@files) { print "Editing $file...\n"; my @lines; open(my $ifh, "<", $file) or die($ERRNO); @lines = <$ifh>; close $ifh; open(my $ofh, ">", $file) or die($ERRNO); foreach my $line (@lines) { $line =~ s/VERSION = [\d\.]+/VERSION = $newversion/g; print $ofh $line; } close $ofh; } print "Done.\n"; exit(0); sub find_pm { my ($workDir) = @_; my @files; opendir(my $dfh, $workDir) or die($ERRNO); while((my $fname = readdir($dfh))) { next if($fname eq "." || $fname eq ".." || $fname eq ".hg"); $fname = $workDir . "/" . $fname; if(-d $fname) { push @files, find_pm($fname); } elsif($fname =~ /\.p[lm]$/i && -f $fname) { push @files, $fname; } } closedir($dfh); return @files; }

It's probably not the most efficient of scripts, but it does the job for me in a lot of open source and closed source projects. This one is taken directly from my Net::Clacks repository. The script is in the "devscripts" directory, which also holds such gems as "fixpragmas.pl" that allows me to change the standard pragmas for all *.pm files in a project all in one go.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

In reply to Re^4: Trying to build a module for upload to CPAN by cavac
in thread Trying to build a module for upload to CPAN by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.