'Dist::Zilla' A Bath for Your Distro
So today in the Dist-pen I am going to add in a few more plugins into my Dist::Zilla just to see how bad my Kwalitee is.
One of the things that has always caused me problems when creating a perl module distribution are the 'required' modules that sometimes may be unknowingly buried in the code or just forgotten when the distro was created. My Database::Accessor package has a large number of required mods so I will have to be careful when creating my Dirstro
Just of the top of my head I have some ten or eleven in the Data::Accessor class and then there are my test cases where there are some more. Now with Dist::Zilla I can add a simple plugin and get most of them automajickaly so I added in
[AutoPrereqs]
Introducing Git::Database
Git::Database is yet another module I wrote to interact with Git. It wraps an OO-layer around Git objects (blobs, trees, commits, tags), in a way that's very similar to what Git::PurePerl does. It has no opinion on the actual means to get the data from the Git object database: that bit is done with the Perl Git wrapper of your choice.
At the moment, there's only one supported wrapper for fetching data from Git: my own Git::Repository. I already have branches with working code (i.e. passing all the relevant tests) for Git::Wrapper, Git::Sub, Git::PurePerl and even the venerable Git.pm, which I'll publish when they are more feature-complete. Git::Class is missing some critical feature I need to get the data from Git, and I couldn't figure out how to get the data using Git::Raw. Patches welcome!
The release is a version 0.001, as I expect the interface to have some rough edges that need some polishing. Depending on the feedback I receive, a version 1.000 should appear in a few months.
PRC 2016 - Third Trimester
Tattletale Variables
Sometimes you might be faced with a huge program that, somewhere, is changing a variable's value to something undesired.
http://tinypig2.blogspot.com/2016/09/tattletale-variables.html
Mmm! Dist::Zilla Tea
Well today in the Dist-Pen I am going to get a little deeper into the basic plugins of Dist::Zilla.
I left off in my last post with Dist::Zilla I needed to add in an 'Abstract' to my dist.ini file and this I did ad first a pod entry
=Abstract: CRUD Interface for any DB
Unfortunately Dist::Zilla didn't like that so I should just did what it said first and add this into my Accessor.pm
package Database::Accessor;
# ABSTRACT: CRUD Interface for any DB
and
Oh column, where art thou?
When ramiroencinas added FileSystem::Capacity::VolumesInfo to Perl 6 ecosystem I've spotted that it has no macOS support. And while trying to contribute to this module I've discovered how less known Perl 6 features can save the day. What FileSystem::Capacity::VolumesInfo module does is parsing output from df command, which looks like this:
TPF at OSCON London
Update: OSCON have supplied us with a discount code for unlimited free Pavillon Plus passes to members of Perl related organisations and the broader community. Just use the code: FREEORG. Use this code when registering for the Pavillion Plus pass and it will zero out the balance. You can register at: http://conferences.oreilly.com/oscon/open-source-eu/public/content/pavilion-pass - thanks to OSCON and O'Reilly for providing this.
This year OSCON, Europe, will be held in London between the 17th-18th October (with a training day on the 19th), the Perl Foundation will once again have a table in the not-for-profit pavilion. As at previous events volunteers will be manning the Perl stand throughout the day on the Monday and Tuesday and they will also be available in the early evening.
CPAN Tutorials
Almost a year ago, I wrote CPAN tutorials. It isn't an original work, it's a derivative of RubyGems Guides, only "translated" to Perl world. I failed to publish it anywhere until now. I'll be happy if anyone finds it useful in any way which the license allows. And I'll be even happier if I get any feedback.
And here it is: http://tynovsky.github.io/cpan-tutorials/
No Such thing as Moose-Zilla!
So the dilemma today is to decide what to call my next series I guess Dist-Pen would be an apt name and now to come up with some catchy titles and imags.
I spent a good little while looking at the fancy new (at least to me) distribution helpers out there and I have made a decision on which one I am going to use with accessor.
Well I have already abused 'ExtUtils::MakeMaker ' over the years so I will not lear much from playing with that one.
As for Module::Build I did play with that for a bit because it is Pure Perl and I have a Windows box but it did not play out the way I wanted. It will not get ne around the fact that I need an 'nmake' installed on my windows box. So I left this one in the dust.
Virtual Spring Cleaning (part 11 of XX) - in which I determine the type of yak wool I need
In what is a somewhat mild case of yak-shaving, I need a portable
way of identifying file types in several situations. For example, when
indexing files for Dancer::SearchApp or when handling user uploads, I want to somewhat reliably identify various files.
I want to determine their type without trusting what the user tells me they are, and I also
want to send the appropriate Content-Type header when serving files again.
The 2016 P5P Hackathon
It is a pleasure to announce that this year the Perl5 Porters Hackathon (http://p5h.org/), held between the 11th to 14th November in Amsterdam, will be hosted by Booking.com and officially supported by The Perl Foundation.
The P5P Hackathon is a seeding event for the essential work done inside the Perl core. It functions as a symposium where current, and future, Perl5 hackers can meet and cross-pollinate ideas that may develop into significant future evolution.
This year the Hackathon has three major aims:
- The sharing of knowledge. This will be facilitated by talks of up to twenty minutes to share information about any field with which the speaker is intimate.
- To facilitate open discussion. Free participation in conversations regarding important topics you or someone else suggests.
- Hacking the Code: Working on specific problems in order to reach tangible results.
The Hackathon will take place within two different locations in Amsterdam at Booking.com offices, both locations are within a short walk of each other.
Looking For Moose Love?
Well there comes a time in every playpen where it is time for bed so this will be the last moose-pen for a little while as I am all out of Moose to do on my Accessor project and I have to start getting it ready for CPAN.
So my love affair with Moose is ending, for the time being, and now I start working on the part of creating packages I dread the most 'Distribution'.
Up to this point in my career I have been lucky the only complex CPAN dist I ever worked with, DBD::Oracle, came with an extensive MakeFile.PL that I really only need to tweak every once an a while. At some 2800+ lines of code I was glad for that.
Short presentation of The new Perl debugger
The link of the project
You may Download presentation or view short video
The main feature of new debugger is debugging debugger commands. Yes you may debug itself (reentrance is not limited). This mean you may extend debugger easily. That is possible because of state of each debugger "copy" is saved in special array accessible through $DB::state
To enable debugger debugging (dd) you turn on this state then run command, you want to debug, after that. Example how to enable debugging debugger command 'step over' (n):
DB::state( 'dd', 1 );
n
Besides new debugger you get the new method to debug scripts and may forget about debugging by 'print' statements.
Now you just put special comment: #DBG: EXPR #
Updating "Toolkit review: Devel::Local, Devel::SimpleTrace, Reply"
2+ years on since I wrote "Toolkit review: Devel::Local, Devel::SimpleTrace, Reply" and I've got a couple more suggestions. I still use Devel::Local a lot but for something more substantial than quick hackery I use mst's App::Myperl.
I don't use Devel::SimpleTrace much anymore.. I switched to Devel::Confess since watching haarg talk about writing it in a video that I can't find right now.
Lastly I still use Reply but I've added Toby Inkster's Pry to my secret weapon list. It makes dropping into a Reply interactive session super easy. (Use pry; pry();)
Enlightened Perl Organisation sponsors Strawberry Perl
I am pleased to announce that Enlightened Perl Organisation (EPO) has kindly extended the support of Strawberry Perl project by sponsoring our build server (VPS) for the next 12 months. I would like to thank Mark Keating for arranging the funding.
For those interested in technical details: the build server is MS Windows 2012 R2 virtual private server, 4 CPU, 16 GB RAM, 120 GB HDD.
If you are also considering supporting Strawberry Perl project you can do it indirectly by becoming EPO member or via donating EPO.
No Moose Today, Well not much really
So in honour YAPCE 2018 it's shiftin bobbins day here in the Moose-pen.
Carrying on from where I left off in yesterday's post I decided it was time I cleaned up a little more of my code. Seems I do this
use Moose;
with qw(Database::Accessor::Roles::Base
Database::Accessor::Roles::Comparators);
use MooseX::Aliases;
use MooseX::Constructor::AllErrors;
or code similar to it a almost a dozen times in the Accessor.pm file. Now there is nothing wrong with this but I think I can clean it up a bit by a just a little re-factoring or shifting things about (hence the link at the top).
Cleaning up the IDs in a FASTA file
I have some FASTA files with headers like this:
>gi|83274083|ref|AC_000032.1| Mus musculus strain mixed chromosome 10, alternate assembly Mm_Celera, whole genome shotgun sequence
I wanted to extract just the 2nd field, so here's a Perl 6 script to do that:
Join me online for 3 hours of Perl 6 training courtesy O'Reilly
Top Ten Things You Need To Know about Perl 6
[The description says 2 hours, but we agreed to 3 over email, I'll get it straightened out. They also got the title from my upcoming OSCON London talk instead the intro, but we'll straighten it out.]
As the title says, I'm working with O'Reilly to deliver a 3-hour training seminar on the basics of Perl 6 in mid-October. This is going to be more targeted to those learning Perl 6 ab initio, rather than seasoned Perl 5 programmers. I do intend to throw a few notes in for current Perl hackers, especially ideas on how to migrate your existing Perl 5 code to Perl 6 in a reasonably painless fashion.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.