Dist::Zilla Likes Change

Another Post-ette here in the dist-pen today.

As we have seen in my last post Dist::Zilla is really good at doing all those boring yet important chores for you distribution, today I am going to look at another the Changes file. All distributions should have a changes file though I would guess there are quite a few without. I do not think there is any standard format out there but usually it is just something akin to

Revision history for xxxx
Changes in xxx.xxx

Now there are a few plug-ins that will create this file but at this stage in my Accessor's evolution and my skills with Dist::Zilla I will not be using any of them. Mostly because I have yet to hook my up my git-hub account of Accessor with Dist::Zilla, but that is in the plan. Today I am just going to start out with a very simple Changes file

Revision history for Database-Accessor
Changes in .01
Initial beta version

and at least in this one I spelled initial correctly, (will have to clean that up later) and I make sure I add create this file in the dir where I am building my disro.
The first plug-in I am going to look at is CheckChangeLog and this should check, after the build is complete, that

  1. I have a change log and

  2. there is an entry for the current version

so I give it a spin with 'dizl build' and I get

skipping private package Database::Accessor::Types in lib/Database/Accessor/Types.pm
[DZ] writing Database-Accessor in Database-Accessor-0.01
[CheckChangeLog] [CheckChangeLog] No Change Log in lib/Changes
[CheckChangeLog] Update your Changes file with an entry for 0.01

ah so I have made a mistake, I should have this in my change log

--Changes in .01
++Changes in 0.01

I also noticed that this is not as fatal error like [PkgVersion] with the 'die_on_existing_version' attrobute, as I did get my 'Database-Accessor-0.01' dir but the 'tar' file was not created.
Now on the next run I get

writing Database-Accessor in Database-Accessor-0.01
[CheckChangeLog] [CheckChangeLog] OK with lib/Changes
[DZ] building archive with Archive::Tar::Wrapper

I checked the out put dir and '.tar' and my changes file was there so all OK.

The next plug-in I wanted to have a look at was 'CheckChangesHasContent' it does promise to do things a a little more automajikal than the previous plug-in. It uses the {{$NEXT}} value to, I guess, set the version #. So in my '.ini' I now have

and in my Changes file

--Changes in 0.01
++Changes in {{$NEXT}}
and I giveer a go and I get the build with no warnings, the '.tar' is created as is the 'Database-Accessor-0.01' dir but when I check the 'Changes' file I still see that {{$NEXT}} present in that file. So I must be doing something wrong here.

Oh well I think I will just stick with the first one for now I like that format better anyway.


Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations