Dist::Zilla and Weaver. Play Nice!

Small problem solving day here in the Dist-Pen.

Just a quick post-ette today to resolve the problem I was having in my last post, where I was trying to get [PodWeaver] to work with 'Pod::Elemental::Transformer'.

I was trying to get this;

=head1 Table Of Contents
=for :list
* Database::Accessor::Tutorial::GettingStarted
* Database::Accessor::Tutorial::Basics
work for my ut it just did not want to play ball with me. I know this should work as I have seen it used in all sorts of other places and in the two tutorials I ran across.

He's Back!!!

Just when you think the Dist::Zilla is gone, I am going to go back to the Dist-Pen for the next few posts.

I could just spend the next thirty posts or so writing up a new POD each day and posting the results here. I wouldn't learn anything though, I alreay know how to write POD, and I am sure I would loose any readers I might of gained over the last few weeks. So I think I will spare us that and instead re-visit Dist-Zilla today.

I am going to re-vist how I am using [PodWeaver] plugin, as I am facing some thirty POD files that will have a good deal of boiler plate in them and I would like to have some things just done for me.

To investigate how Pod::Weaver works I created only a single POD today 'Manual.pod' with just this in it

=head1 Database::Accessor is not an ORM

No Dist::Zilla

I guess it is the POD-pen now.

The third POD post in as many days and really noting to do with Dist::Zilla so I guess I will have to find some other pictures to post.

After yesterday's post I took some time and had a look at a large number of different CPAN modules to get some ideas on the contents and style of my Accessor POD.

One thing that I have seem many modules do is break their documentation into separate PODs, under the names-pace and I will do that with Accessor as well.

I am going to keep some things in the Accessor.pm proper as it is good to have some basic info present, most of the other items I have been working on over the past few days I think I will break into separate POD.

So here is the first draft (outline) of my documentation in all its glory by Names-pace


  • Abstract
  • Synopsis
  • Description
  • Getting Started
  • Resources

Perl Module Tools (pmtools) v2.2.0 Released - Many RT Fixes

Perl Module Tools (pmtools) v2.2.0 has been released (and updated on GitHub). The focus was on fixing RT bugs. The only outstanding RT issue will be 52851, which is a feature request for pmeth to also display a description for the method. This will require some contemplation to see if I can do this in a reasonably simple manner.

(I say "will be" because rt.cpan.org does not yet have 2.2.0 as a valid version number for pmtools.)

Yancy - Mojolicious CMS - Version 1 released

I'm happy to announce the release of version 1 of Yancy, a simple content management system for Mojolicious websites. Yancy is designed to be added to your website to make it easier to develop a web application and manage the content inside.


Yancy features a responsive web application that uses your database schema to build forms to edit your site's content. Yancy currently understands databases like Postgres, MySQL, and SQLite, and the DBIx::Class ORM.

Perl Module Tools (pmtools) v2.1.2 Released - Version Fixed

Perl Module Tools v2.1.2 has now been released to fix the version number everywhere.

Pi Day!

Yesterday, when I published and wrote a blog about my new RPi::StepperMotor distribution, I didn't even think that the very next day was Pi Day.

So, although nothing significant could be done in the meantime, I updated that dist with a cleanup() method which resets the GPIO pins at the end of your script, and published version 2.3623 of RPi::WiringPi, which is the top-level framework that allows you to safely pull in all of the other RPi:: distribution objects.

Changes include:

  • bumping GPSD::Parse prereq due to having added some convenience methods to it

  • Documentation fixes and updates (all broken links now work!)

  • incorporation of said RPi::StepperMotor distribution

Nothing major, but since most of my personal programming time the last two years has gone into Raspberry Pi work for Perl, thought I'd do at least something :)

byterock, this one's for you...


Dist::Zilla Goes to SKULE

Another boring day in the POD-pen

I am getting sick of writing up PO of well necessary evil I guess at least my post will be sort for the next few days.

Today I managed to get my methods and attributes all written up but that left me with a layout dilemma that I have to solve. Should I go with the very traditional POD alphabetical grouping like this

  • Methods
    • add_condition
    • add_element
    • add_filter
    • add_gather
    • add_link
    • add_sort
    • create
    • delete
    • new
    • retrieve
    • update
  • Attributes
    • available_drivers
    • conditions
    • delete_requires_condition
    • dynamic_conditions
    • dynamic_elements
    • dynamic_filters
    • dynamic_gathers
    • available_drivers
    • dynamic_links
    • dynamic_sorts
    • elements
    • ...

No need to put up all the attributes up there as the list goes on a bit.

At first glance it looks ok but if I was interested in the 'elements' attribute I would have to look in at least three different places to gather all the info I may need.

My present 'Elements' entry looks something like this

elements (RO) ARRAY-REF

An array ref of Element, Param, Function or Expression classes that are passed to the underlying DAD. ...

Perl Module Tools v2.1.0 Released - Windows Fixes

It turns out there are several tools in the Perl Module Tools (pmtools) that need to execute other commands with the current Perl specified, like:

system "ls -l " . `$^X -S $Bin/pmpath $module`;

(note the additional "$^X").

As a side note, in Windows you may need to "use FindBin qw($Bin);" so your programs can actually find the Perl to run. (I had wondered if this use of FindBin was just cargo-cult programming carried over from old versions of Perl - now I know better.)

Controlling a stepper motor with the Raspberry Pi

I live in an extremely remote part of Northern British Columbia, Canada. It is a minimum of an hour to get to the nearest town. We are exceptionally sparsely populated with a vast amount of land right on the second-largest lake in the province.

To that end, we have a wild abundance of wildlife everywhere. Bears, moose, wolves, coyotes, deer etc etc. I set out to set up a series (eight) wildlife cameras using Raspberry Pis (four on my house, the other four each on a separate cabin), all streaming to a central server that I can display on a television set, with all eight camera streams within a single window.

After I accomplished the bulk of that work, I wanted a way to pan and tilt my cameras individually. The tilt part I use a standard servo with the the servo() functionality of the RPi::WiringPi distribution.

Dist::Zilla Does Pod

So it is POD day here in the Dist-Pen.

I am not going two write up another POD tutorial as there are tons of those about what today's post-ette
is about what happened when you start writing up your POD.

What I always like to do in the POD process is start writing it at about the very same time when I am coding things up and fill in most of the banks as I go along. Others are of the do it at the beginning and others are wait for the end. So I guess I take the middle ground.

I have worked on both ends of the spectrum.


Last year I released this new module.

I want to talk about its purpose briefly, because in the time since, people have published benchmarks of how it performs compared to other modules that offer alternatives to eval. The latest example of such a benchmark is part of the Exceptions chapter in Minimum Viable Perl (via), but they go as far back as Diab Jerius’ shootout right after I released the module.

It is, of course, interesting to see the figures to see where Try::Tiny::Tiny falls.

However, simply treating it like another contender in such a contest misunderstands its purpose. Try::Tiny::Tiny is not meant to compete with any of the other modules. It is not meant to be your choice for exception block syntax.

I do not recommend that you use Try::Tiny::Tiny in your own code.

Dist-Zilla Hates Tidy

It is discovery of silly mistakes day here in the Dist-pen.

Over the past few posts I have been running down a persnickety bug in my Database::Accessor system. I had first seen it while expanding and cleaning up my test cases and I thought at first I fixed it with a simple 'lib' statement and a slight change to my embedded classes. As I dug down into my test cases the bug came up again I reverted that embedded class change and added in a kludged that so at least my test cases all passed. I wasn't satisfied with this and did some more hacking and found my 'fix' was not I had a real bug, which I fixed in the end.

Today I found the root cause of my bug, I went back to play on my Windows box today and before I did a pull of my fixed code I did a quick diff and found this

Building a Software Consulting Firm

Hey, I'm not dead! I just haven't posted in a while because I've been so busy on Tau Station (which, if all goes well, will be open for everyone real soon™).

In the meantime, I've written a bit about building a software consulting firm. You might find it interesting.

If you need to outsource software development with a firm you can trust, contact us.

The Perl Conference Newsletter: 3/11/18

The latest TPC Newsletter is out!

Last round of talks submissions. CFP closes 3/18/18!

Round 1 and Round 2 Speakers/Sessions announced.

A decade of classes in Lausanne

I'll be back in Lausanne again this May...my tenth visit to UNIL and my second to EPFL. Both of these prestigious institutions were founded well before my own country became an independent nation (and UNIL actually dates back to 50 years before the first European even set foot on the Australian continent).

To celebrate a decade of visiting lectures at the University, we're going to offer a rare public performance of my classic Fun With Dead Languages presentation. It's many years since I had the chance to give the full two-hour version of this talk and I've been busily updating it for the occasion. The talk is completely free, but we do want people to register in advance if possible so we can schedule a suitable venue for it.

In addition to that event, of course, we'll still be running a full range of classes on technical and presentation topics:

Dist::Zilla is Sad or is that Happy?

Sad day here at the Dist-pen.

Today I awoke still having nagging doubts about putting a copy of 'Database::Accessor::DAD::Test' directly into 'Test::Database::Accessor::Utils'. It did get all my tests to run correctly but it still was a cheat or a kludge at best.

So today I did build and then installed ' Database::Accessor ' on my Ubuntu box as I wanted to see if I could get this little script;

use Database::Accessor;
my $in_hash = {
    view     => { name => 'People' },
    elements => [{name => 'first_name',
                            view => 'People'}, ],
my $da = Database::Accessor->new($in_hash);
my $return_str = {};
my $data       = Data::Test->new();
$da->retrieve( $data, $return_str );
  package Data::Test;
  use strict;

  sub new {
    my $class = shift;

    my $self = {};
    bless( $self, ( ref($class) || $class ) );

    return ($self);


Dist::Zilla Party Time

Its a good day for a party here in the Dist-pen.

A milestone here today in the Dist-pen. I finally got;

t/56_retrieve.t ............. ok
t/test.t .................... ok
All tests successful.
Files=26, Tests=319, 34 wallclock secs ( 0.21 usr  0.11 sys + 31.23 cusr  1.99 csys = 33.54 CPU)
Result: PASS
[DZ] all's well; removing .build/usLuCs7LTk
So time for a praty.

Once I got though that problem I had with my last post, I quickly went through the last set of tests updating mostly the includes and the lib call and finally got the result above.

I did notice one thing I kept getting this

t/56_retrieve.t ............. Useless use of string in void context at /home/scolesj/database-accessor/.build/usLuCs7LTk/blib/lib/Database/Accessor.pm line 111.

Very Little Dist::Zilla

Only an indirect dist-pen post today.

You ever have one of those days. Your code just does not want to come together and gives you know end of grief. Well today was one of those days for me.

I left off yesterday with what I though was a solution for my problems with 't/30_view.t', by moving my 'Database::Accessor::Roles::DAD' out of Accessor.pm and into its own file. Seem I still had a problem as in the 'Database::Accessor::DAD::Test' I still had a 'use Database::Accessor;' present.

Now that was setting up a circular call to Accessor.pm, as well it was never my intention for some-one to use a DAD directly only as a call from Database::Accessor. In the next test case 't/31_elements.t' I got

RETRIEVE No Database::Accessor::Driver loaded for Data::Test Maybe you have to install a Database::Accessor::DAD::?? for it? at...
# Looks like your test exited with 2 just after 1.

Dist::Zilla Plan

Just when you think Dist-Pen is gone its back again.

Now that I have my Dist::Zilla mostly worked out with all sorts of test goodies it is time that I buckle down and finish off and or clean up all my 'Automated' level test. As an side note, the term 'Automated' tests was a little confusing for me. I eventually figured out that by automated they (however they may be?) mean test that CPANTS will run. Normally these are the test in your 't' dir.

Myself I guess I must just be old school as I always called these module tests and it wasn't until I embarked on my Dist::Zilla trip that I have come to see the advantage of splitting your tests that really have noting to do with the function or you module, POD, spelling, Kwalitee etc, into the hand 'xt' dir.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.