Showing posts with label app::pm::website. Show all posts
Showing posts with label app::pm::website. Show all posts

Friday, August 31, 2012

Unexpected error report from cpantesters!?

After pushing my release of App::PM::Website, I received a cpantesters failure report. Opening it revealed an error from File::Path not exporting make_path. What-the-what? Of course File::Path exports make_path, that's like all it does!
# Failed test 'no eval errors'
# at t/app-pm-website.t line 12.
# got: '"make_path" is not exported by the File::Path module

Further inspection of the report shows that this test box is using File::Path v2.04 with perl 5.10. You remember: the File::Path version released in 2007.

PREREQUISITES:
Here is a list of prerequisites you specified and versions we
managed to load:

Module Name Have Want
App::Cmd 0.318 0
App::Cmd::Command 0.318 0
App::Cmd::Tester 0.318 0
Config::YAML 1.42 0
Data::Dumper 2.121_14 0
Date::Parse 2.30 0
DateTime 0.76 0
DateTime::Format::Strptime 1.52 0
File::Path 2.04 0
File::Spec 3.33 0
...

Ok, so this was me being lazy in importing my File::Path requirement, as I clearly needed 2.07 or greater (from 2008). wow. Patched version of App::PM::Website is now released and pushed to CPAN.

I have to wonder if this is a box set to be purposefully obtuse and install the lowest version it could find that matched my requirements, just to catch this sort of thing? If so, my hat is off to you fine perler!

Wednesday, August 29, 2012

Update your Perl Monger group page with App::PM::Website

Fresh CPAN Upload: my first public release of App::PM::Website!

App::PM::Website installs pm-website, a commandline tool for maintaining a perl monger website at pm.org. pm-website handles rendering the index page and updating it via WebDAV.

Monger groups get free hosting at $group.pm.org, but only static content is allowed and it can only be edited via WebDAV. I use pm-website to maintain the Los Angeles Perl Mongers website.

WebDAV is not complicated, but it can be a pain. Once I decided to automate the WebDAV upload, it was a quick hop, skip and a jump to automating the whole process of updating the front page with information about the next meeting and updating the list of past meetings.

A single yaml configuration file maintains configuration and data for the meetings, presenters and locations. Updating for a new meeting is a simple matter of adding an entry in the meetings array with the date, location and information about the presentations and presenters. pm-website build renders the page and pm-website install pushes it via WebDAV.

Get started by creating a stub configuration file with pm-website init. Check out the la.pm.org source repository on github for more inspiration.

Technical details:

App::PM::Website uses App::Cmd and is easily extensible by writing new commands in the App::PM::Website::Command::* namespace. HTTP::DAV provides WebDAV transport and Net::Netrc handles reading credentials from a standard .netrc file. Template::Toolkit is used for rendering the index template. App::PM::Website is a Dist::Zilla based distribution.

Check out the app-pm-website source at github.