So the time has come to pick which of the thee patterns I am going to choose to carry on. So here is how I evaluated each one giving advantages first.
Pure Moose;
Accomplished all system requirements, loaded and ran fast, required the least number of external modules, code easy to implement by LSD writers.
Requires the use of 'Klugeish' code son the DA side. The call '$class->new' can be confusing to some as this appears to be some sort of majik var. Options available on the interface are limited.
MooseX::ShortCut::BuildInstance;
Accomplished all system requirements, interface has many options which may prove useful, good name-space management, code easy to implement by LDS writers, clear interface on DA side of coding.
Slowest to load, has a moderate number of dependencies,
MooseX::Scaffold
Accomplished all system requirements, interface has many options which may prove useful
Second slowest to load, has a few dependencies, the code requires the most from the LSD writer and the interface for the DA writer is the largest.
Why is that better? Because nobody knows what $" is, but everyone knows what join() is. Always write your software to be as readable as possible :)
I received a couple of upset replies along the lines of "Perl devs should be allowed to write Perl!" While I generally agree with that sentiment -- I had no problem with the array slice, for example -- I think the replies came, in part, because I had answered too quickly. I clarified what I meant, but I thought I should explain it here, too, because too many people reach for those punctuation variables.
So now that that I have three prototypes out there for DA
Pure Moose
MooseX::Scaffold and
MooseX::ShortCut::BuildInstance
The question becomes which one to to choose. They all do what I want them to enforce my API , keep the LSD code from beading into the DA code and all allow me now enter just a connection object and the correct LSD will be loaded.
One thing to do is run some benchmark test to see how fast the various scripts load and then run. I might not matter at this early stage bu I could see that the LSDs could become rather extensive as my original one was something like 2000+ lines of code and that could take some time to load.
I know it is rather old school of me to look into this as given the speed of modern system instaniating my object would likely be one of the quicker part of the code and the actual query would be the long part of this code, but every little bit helps.
Last Friday Test-Simple 1.302014_009 was released. That plan was to bump that distributions version number and release it as stable this Friday May 6'th.
Since that release a number of minor bugs have been fixed. Most of these are typo fixes and documentation changes. There were also some mistakes in our x-breaks meta-data that needed to be corrected. Finally there was one bug fixed that was not as minor, a 64-byte shared memory leak when using threads.
I have decided that these fixes, in particular the last one, are important enough to put out a new dev release, and bump out the stable release date. 1.302014_010 will hit cpan today. Assuming no other substantial bugs are found the new release date will be Tuesday May 10'th. Obviously being correct is more important than releasing by a specific date, so if significant items are found the release could be delayed again.
Since my recent participation at the QA Hackathon I have become aware that rather more people than I expected do not know the specifics of this situation. Fewer than I expected have heard of it at all, even, although there appears to be some general awareness at the “something happened with that” level at least.
However, the situation is being used to characterise Marc Lehmann whenever his name comes up (and it comes up rather more often than I would expect or consider necessary).
To give a clear picture of the facts and to avoid repeating that exercise every time I have a related conversation, here is an outline of where we are and how we got here.
(Thanks to Andreas König, Graham Knop, and Peter Rabbitson for proofreading drafts of this article and verifying the stated facts.)
Now I do have a working version of the MooseXs Scaffold and Shortcut and even built out the Shortcut version to not hard-code the LSD classes I might have to load. Now what I do not have a pure Moose version so I think I will stub that out now using what I have learned form the other Modules.
Now it really did not take much time or effort to make this a pure
Moose mod.
All I had to to was make some adjustments BUILD like this
Ahoy, matey! I heard thar be traitors in our ranks! We need t' search t' ship 'n find every last one o' them, put them through exquisite torture, 'n then make them swim t' plank. Now t' ye, I gift a task! Learn everythin' ye can 'bout these traitors 'n all o' t' "traits" they use. Ye succeed, a full barrel o' spiced rum gunna be me generous gift t' ye!
PART I: Built-In Traits
Traits! In Perl 6, they're subs executed at compile time that make your code tight and sexy. There's a whole bunch of them built into Perl 6 and today we'll explore some of them.
is ...
sub foo ($bar is copy) is export { ... }
has $.foo is rw is required;
class Foo is Bar { ... }
There are several built-in traits that you apply with the is keyword. Let's
take a look at some of the oft-used:
As you're probably very aware by now, the Perl QA Hackathon was last weekend, and it was a great success. Just under 40 people assembled in Rugby in the UK, to work on the Perl and CPAN infrastructure that everyone using Perl relies on. Many bugs were fixed, problems solved, ideas germinated, and cans kicked down the road. Those same people working alone for 4 days would not have achieved anywhere near as much, and that's why we do this, every year.
This year I've had the chance to attend the Perl QA Hackathon as "the intern". Needless to say, it was an honor and a great pleasure to take part in the event and go through a very stimulating 4 days coding and discussing with people I have a huge respect for and whose work has been a reference for me since I started my journey in the perl world.
I have to admit I was going to the event feeling quite a bit of pressure: I wanted to be able to be helpful and contribute work but, at the same time, to not be too disruptive.
Regarding that, I was honestly very surprised with how welcomed the rest of attendees made me feel since the very beginning. Honestly, I do believe this is quite unusual in tech communities and, therefore, I think it deserves to be valued.
Without any kind of doubt this was key in making me feel comfortable and being much more productive during the hackathon (thanks!).
Last year, at the QA Hackathon 2015 in Berlin, I created a branch for PAUSE to use Plack, and succeeded to make it live on a staging environment. However, we didn't merge it into the master, because we knew we still need something to keep it running. Thus naturally, one of my goals of this year's hackathon was to do those necessary things. I spent about two days with Andreas Koenig and Slaven Rezic to make Plack-driven PAUSE stable, fixing several bugs/regressions I made last year, and tweaking options for Starman and Perlbal. We may still have several issues to deal with (including an occasional connection issue we saw), but anyway, PAUSE Web is running on Plack now.
I attended the Perl QA Hackathon 2016 in Rugby. I didn't come with any specific projects, and planned to participate in some of the discussions, help others if possible, learn a bit of Perl 6 and if all else failed, work on some of my own CPAN projects. I did a little bit of all.
One thing I have neglected till this time was how to Load in my LSD classes. Up till now, for testing purposes, I have been always hard-codeing my Mongo and SQL LSDs in my code, and it did not matter if they where a Role like this
apply_all_roles( $self, "DA::LSD::SQL");
or a class such as this
use DA_S::LSD::Mongo;
$lsd = DA_S::LSD::Mongo->new(elements=>$self->elements,view=>$self->view);
in the long run I will have have to have some way to get them into my name-space without having to recode my DA each time a new LSD is created.
While I have hung out on the fringes of the p5p and toolchain communities for a few years now, my largest “qualifying” contribution has been Alien::Base, which has largely been handed off to Graham Ollis (plicease).
Therefore I was a little surprised but very honored to be invited to the 2016 Perl QA Hackathon held in Rugby, England.
Overall it was an incredible experience.
Day after day the energy in the room was palpable.
Everyone was creating and improving the code that we would all get to use one way or the other.
People hacking on PAUSE and MetaCPAN and CPANTesters, on ExtUtils::MakeMaker, on Test2 and Test::More.
Lately I have been working on writing some serious Perl 6 so I can discuss and review at the NYC Perl 6 Beginners group in NY.pm. After doing some research I then realize that I need to install additional Perl 6 modules on my Windows machine. In a Rakudo Star installation for Windows you have Panda as your default Perl6 module manager but it doesn't quite work for Windows just yet. In this post I list a few Gotchas while attempting to install HTTP::UserAgent on Windows