Improving coverage with metacpan

I've been reviewing the coverage of the tests of modules using metacpan.org.

It is pretty handy for finding stuff which is not tested.

I tried it on this module:

https://metacpan.org/release/Directory-Diff

I noticed that a lot of the code had no tests, and there were also some completely unused subroutines.

coverage-before.png

I removed some of the unused subroutines and wrote some tests for the remaining things, and was able to improve the coverage:

coverage-after.png

This seems quite handy.

Dancer2 0.207000 released

The latest version of Dancer2 is out the door, and it is chock full of changes! A few new features worth noting include:

  • send_as() now allows you to easily send plain text content (in addition to JSON and other formats (Steve Dondley)
  • Mutable serialization with custom mappings (Russell @veryrusty Jenkins, Yanick Champoux, Daniel Böhmer, Steven Humphrey)
  • A new no_default_middlewares setting to allow Dancer2 applications to work with ETag (and similar) middlewares in the Plack stack (veryrusty)

There have been a lot of documentation improvements made, driven largely by the members of our awesome community.

The full changelog is as follows:

Every Moose has a bad day.

Another sad day in the Moose-Pen

Not a good way to start another year of blogging as I was reviewing my tests and when I got into '47_dynamic_gathers.t' I was getting a duplication on the number of conditions on a gather which is not a good thing.

Somewhere in the last few days I really buggered something up.

Well after much hair pulling and debugging I finally stumbled into it. It seems I have added so many warns and comment out code over the past few days I was playing with subs that look like this;

Adding a ROADMAP section to the POD

I've like to propose adding a ROADMAP section to module documentation.

It would be a *short* summary of planned changes for future versions, noting what features would be removed or changed, or upcoming new features that will be added.

More detailed roadmaps should be put in a separate file (e.g. `ROADMAP` or `ROADMAP.md`) that should be referred to in the section. Or link to the roadmap if it's online.

meta::hack is back!

We're in Chicago and we're hacking on MetaCPAN.

Read the full post.

Announce: Raku Perl 6 'Diwali' 6.d Language Specification Release

On behalf of the development team, it brings me great pleasure to announce the 6.d ‘Diwali’ major version release of the Official Specification of the Raku Perl 6 programming language.

Please see the PDF of our Release Brochure for all the details: marketing.perl6.org/id/1541379592/pdf_digital (print-friendly version is also available on marketing.perl6.org)

If you are unable to view PDF documents, most important details are also available as a plain text file in the repository github.com/perl6/roast/blob/master/docs/announce/6.d.md

Compiler releases with 6.d as their default language version will follow their standard release scheduling (for Rakudo compiler, release process will start on 2018-11-17)

Happy Diwali!

Untitled.png

Yearling Moose

Final final final clean up day here in the Moose-Pen

Just a quick postette today cleaning up the last of my messages on my error retruns. Starting with this one;

 'Database::Accessor Database::Accessor::add_condition Error:
 The following Attribute is required: (conditions->left)
 With constructor hash:
 {
   'predicates' => {
                     'operator' => undef,
so two thing to get rid of here, get rid of that 'Database::Accessor::' in front of 'add_condition' and change that constructor has so it dose not show that hidden 'predicates' key the first fix is easy enough;

Mojolicious Advent Calendar 2018 call for posts

Do you want to post an article in this year’s #mojolicious #AdventCalendar? I’ve just posted a call for articles in the mailing list. You do and know things that other people want to learn about, I promise!

Read more in Call for posts: Advent Calendar 2018!

(Please reply there, as I don’t get notifications from this site on comment.)

Mojolicous: configure plugin's actions

While writing plugins we can do something:

$app->plugin( Auth => {
    user_check =>  sub{
        my( $user ) =  @_;

        # authentication_code_here;
    },
);

But I prefer to keep my sturtup sub clean. Thus I route to controller’s action:

$app->plugin( Auth => { auth_check => 'auth#check' } );

Doing so I need to check in my plugin passed value. Is it sub or shortcut auth#check?

And to simplify checking I implement next route shourtcut

Next stable DBD::SQLite will be released at the end of November

DBD::SQLite 1.59_03 (with SQLite 3.25.2) is a release candidate of the next stable DBD::SQLite. Notable new features by the upstream are PostgreSQL-style UPSERT (3.24.0), ALTER TABLE table RENAME COLUMN oldname TO newname (3.25.0), and window functions (3.25.0), among others.

It also contains a fix that changes how to store values in a PerlData virtual table. If you use PerlData virtual table, this may affect your applications.

I'll wait for about a month as always, and release 1.60 at the end of November if there's no blocker nor request to wait more. Thank you for patience.

Moose at the edge

Its get back on track day here Moose pen.

I left off with the add_sort and did some refracting that when a little awry but I did get back on track. As it stands I have this original

The Perl Conference - Glasgow 2018 - Individual videos now live

Thanks to the hard work of Shadowcat Systems, the individual videos are now available:

Wednesday

cPanel Theatre

Zoopla Theatre

Pirum Theatre

Monthly Report - October

Perl 6 Advent Calendar 2018 Call for Authors

Read this article on Rakudo.Party

Every year since 2009, the Perl 6 community publishes a Perl 6 advent calendar, in the form of blog posts on perl6advent.wordpress.com.

To keep up this great tradition, we need 24 blog posts, and volunteers who write them. If you want to contribute a blog post about anything related to Perl 6, please add your name (and potentially also a topic already) to the schedule, and if you don't yet have a login on the advent blog, please tell Zoffix or someone on #perl6 IRC chat your email address so that they can send you an invitation to Wordpress for the site.

Perl 6 advent blog posts should be finished the day before they are due, and published on midnight (UTC) of the due date as publishing date.

If you have any questions, or want to discuss blog post ideas, please join on the #perl6 IRC channel on irc.freenode.org.

Moose Lights up

Is may be the end of the errors Day here in the Moose-Pen.


I spen quite a bit of time mulling over the various options and possible solutions to the rater large mess I made yesterday with my recursive call to a eval.

I did manage to do a very long coded version where de-factored my code back to what it was when I starter earlier this week. A block of code for each 'undef' sistuation.

I wasn’t really satisfied with that as it was ugly, unmaintainable and I think very fragile once I got into more that two levels of recursion on my evals.

What to do?

Well I had a peek at the guts of 'AllErrors' MooseX and from the I could see that it was warping anything I was doing a new with its own 'around BUILDARGS' so that explain why I was getting three errors rather than just one. I also means that I have to do another shameful act;

The SSL certificate of the domain of the Perl 5 repository has expired

The SSL certificate of the domain of the Perl 5 repository has expired from 10/19.

https://perl5.git.perl.org/perl.git

Using Perlbrew after macOS Mojave 10.14 update

I would like to share a minor fixup when using Perl with Perlbrew on MacOS.

After updating to MacOS X Mojave... I was not able to compile any XS module.. or even reinstall a different version of Perl itself...

Here one example output when trying to compile Clone for example

Perl6::Math::Matrix (Part 5: patient with docs)

If you write any software package, you have to document it. This simple truth drives more than few developers into despair. But there is also a way to craft good documentation and make the writing of it a useful part of the development. This is the closing part about authoring a Perl 6 module and Math::Matrix in particular (part: one, two, three, and four).

Moose in a Dark Place

Still stuck in error land in the Moose-Pen.

As I finally got the 'add_condition' to work I still needed to add in a few more tests for the other three 'dynamic' attributes, gather, link and sort.

Well I started with the easiest first 'sort' and on the 'undef' I am getting the now very familiar;

Attribute (name) is required at D:\GitHub\database-accessor\lib/Database/Accessor/Types.pm line 348
It did not take me very long to back track this one to the '_element_coerce' sub in my 'Types' class; As this had the same sort of fall though 'if' case like '_predicate_array_or_object' I at first added my check for undef code in the final 'if' of that statement;

Graphics::ColorNames changes

I have been making a lot of changes to Graphics::ColorNames lately. The module has gone too long without any maintenance, and suffered from feature bloat.

Some notable changes that are already on CPAN:

  • A switch to semantic versioning, e.g. v3.3.3.
  • Some color schemes (Netscape, HTML, Windows) have been moved to separate modules.
  • The Netscape and HTML schemes have been deprecated in favor of the WWW scheme.
  • The X scheme has been updated to the latest X-Windows colors (which includes the CSS/WWW colors).

Roadmap for the future

I am planning on making the following changes:

  • Removing autoloaded method names for colors.

  • Removing the (deprecated) tied interface, but putting that in a separate module

  • Moving the color schemes into the Graphics::ColorNames::Schemes namespace, but provide an option to use the old namespace.

  • Change it to a Moo-based class

  • Removing support for Perls < v5.10.

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.