Searching for Mrs X

So yesterday I muddled myself up quite well, so It took a little time to see if I could come up with a solution. Thinking that someone else might have had the same problem I did a troll of Map of CPAN looking for a MooseX that might help me out.

Now I was looking at briefly at one point of using a delegated object but the problems with that is I contaminated my parent object with unneeded code and I would also have to iterate all the way though my attributes, never a good practice.

Alpine Perl Workshop 2016

This year, Austrian and Swiss Perl Monger groups join forces to host the first Alpine Perl Workshop, taking place at the University of Innsbruck on 2nd and 3rd September 2016 (that’s a week after YAPC::Europe). Attendance is free, though we do offer a voluntary business tariff (90€).

We are currently looking for Sponsors and Speakers.

Registration and Call for Papers is open: http://act.yapc.eu/alpineperl2016/

Please contact us if you like to volunteer with the website design.

Call for Papers

We are looking for talks about Perl 5, Perl 6, CPAN, other Perl-related topics, not-so-much-Perl-related topics and other interesting stuff. We offer 20 and 40 minutes slots, but prefer two shorter talks to one long. There will also be lightning talks (5 minutes).

Talks can be in English or German, preferably in the language you feel more comfortable in. As we expect some guests who might not speak German, it would be a good idea to provide English slides if you plan to speak German. But please consider that the majority of attendees will be German speakers (if we consider schwiizerdütsch, tirolerisch and even wienerisch as German..)

Please submit your talks via the website. Deadline for talk submission is 31st July 2016.

MetaCPAN at the 2016 Perl QA Hackathon

We made some very good progress on MetaCPAN at this year's QA Hackathon in Rugby. The whole post can be found here.

My first QAH (QA Hackathon)

The QA Hackathon gathers various major contributors to the core infrastructure of the Perl language and the CPAN. People who have immense responsibility and whose contributions fuel our work and our businesses.

The QAH is a good opportunity for these contributors to discuss important topics, reach solutions or make decisions on how to move forward, and to hack on all the core infrastructure.

I was invited to this QAH hoping I will be able to contribute. While I finally got to see a lot of people I missed and had the pleasure of meeting people I've always wished, I also tried to work on several things, all described in the results page. I'd like to get into a bit of details regarding the work I did. Let's hope it was useful enough to justify my attendance.

Well that's not it!!

So lets see how I am going to move those annoying 'sub SQL' that I have in my DA::View and DA::Element packages out of them and into my LSDs.

So going blindly where I have gone before though the I might Role for the Element class in DA::LSD::SQL and see what I can come up with. So I duly added this

Perl QA Hackathon - Thanks

Besides thanking the sponsors, I also want to have a dedicated entry to say a big Thank You to the organizers. Neil Bowers, JJ, and Barbie. It was an incredible experience, well organized, nice city, and especially a nice hotel which although it could not provide "the real Wall" at least tried very hard to surround me with little Perl history hints:

Thumbnail image for Nick-Clark.jpg

I'm looking forward to whatever Sawyer device they will invent after his 16th Perl release in a row. :-)

Another big Thank You to the Wendy for the support with fresh and healthy food. And also for the less healthy and chocolate stuff :-). And another big Thank You to all the other great attendees there - it is always a pleasure to spend the time with you all.

Thumbnail image for sandwich.jpg

use Net::SMTPS for specifying ssl version v1

I am migrating a couple of my domains from mandrill to sparkpost
Net::SMTP by default uses SSLv3 which is not allowed by many providers due to the poodle vulnerability . I had a problem with sparkpost API and had to use Net::SMTPS which is a wrapper for Net::SMTP and you can specify the SSL version.

Perl 6: Comb It!

In Perl 5, I always appreciated the convenience of constructs like these two:

my @things = $text =~ /thing/g;
my %things = $text =~ /(key)...(value)/g;

You take some nice, predictable text, pop a regex next to it, and BOOM! You get a nice list of things or a pretty hash. Magical!

There are some similarities to this construct in Perl 6, but if you're a new programmer, with Perl 5 background, there might be some confusion. First, using several captures doesn't result in nice hashes right off the bat. Second, you don't get strings, you get Match objects.

While Matches are fine, let's look at a tool more suited for the job: The comb

20160425-Perl6-Comb-It.jpg

Plain 'Ol Characters

You can use comb as a subroutine or as a method. In its basic form, comb simply breaks up strings into characters:

And now for Tea

Now in my last post I left off with a bit of a code mess. Roles bleeding code into each other and my API in a dreadful state.

Well on thing I have seen before in non moose apps was use something called 'Class::Rebless' to rip the 'DA::LSDs' from my DA class but that is sort of an abuse of that code as it really is just for renaming name-space and I am not sure it will do what I want.

I had a look about the Moose::MOP class and found something called 'rebless_instance' which should take my original class, in this case DA with one or more LSD roles back to just a DA class.

Seems like a good idea but I think I would be opening myself up to a whole new slew of problems as I would only have a base object perhaps with it attributes in place and any other roles I may want removed.

So what to do??

A pumpking is born

As some of you might have heard, Ricardo Signes had stepped down from the role of Perl Pumpking. He passed on that role to me.

I have written the following message to Perl 5 Porters, and I think it seems apt to provide it at large to the community here:

("group" in this context is the Perl 5 core development group: p5p.)

Testing with AppVeyor

If you ever wanted to test your CPAN modules on Windows systems without having an own Windows system setup, then you should take a look at AppVeyor. Basically it's something like travis-ci, but just running on Windows. Configuration happens in a YAML file named appveyor.yml.

A sample appveyor.yml file for testing CPAN distributions may look like this:

Overview of current maintainer fails

schmorp recently complained about a maintainer fail in Math::BigFloat, and since this is not an isolated incident of the last years, I try to give a summary of all the maintainer fails of important modules lately, as I happen to fix them privately.

Problems in core ext/ and dist/ modules, maintained by p5p:

These are all doomed modules, as p5p refuses to take bug and security reports, and most of them are not maintained and fixed and improved in cperl only.

Math::BigFloat

Maintained by p5p, responsible: pjacklam

regression in blsflt (left shift) and refusal to fix it, lack of understanding of float math.

fixed in cperl only. in cperl we also heavily modernized all the bigint/bignum/bigrat/Big::* modules to use typed signatures.

there were several podcheck fails, which were promptly fixed. so they do react fast, their only problem is the lack of understanding.

Storable

maintained by p5p, responsible: nobody

Never Role Twice!

Well did a little more playing about with my applied roles on my DA.pm and added in a bunch more testing to see if things where working for me.

First I wanted to see if using a role twice caused any ill effects so I added

These benchmarks seem wrong...

Back in the fall of 2013 I began working on a project called C::Blocks. After some very long detours the project is finally coming to fruition. I recently took it for a spin on a benchmark from the benchmarksgame. The results? Let's just say I was very surprised.

A very stupid, over-clever scoping-based importing trick

In some code I’m working on, I use a module which exposes a whole bunch of package variables as part of its public interface. It does not export them, however. I could refer to them directly by prefixing them all with Some::Module::, but that would be ugly and verbose. It’s also unsafe – the vars stricture will not help you catch typos if you use fully qualified names.

The obvious solution would be to emulate what exporting does:

Perl QAH and MetaCPAN

This year was my first Perl Quality Assurance Hackathon, and even then I could only make 2 of the 4 days. I now wish I'd been to everyone ever, and for the full time!

I've been working on the MetaCPAN project for over 4 years, taking on the puppet master/sysadmin/development VM builder type role, even though that's not really my day job. So after all this time to actually meet Olaf Alders and the recently joined Mickey was a great pleasure:

Many Sides of Moose!!

In my last post I did managed to make a little code progress but I still had one major goal to accomplish and that is to make my Data Accessor smart enough that is would know what Driver to use form the connection passed in.

Well I am glad to say I am now able to do that with this test 02_base.t

ok 1 - use DA;
ok 2 - use DA::View;
ok 3 - use DA::Element;
ok 4 - Person is a View
ok 5 - Street is an Element
ok 6 - County is an Element
ok 7 - City is an Element
ok 8 - Address is a DA
ok 9 - SQL correct
ok 10 - Mongo Query correct

Moose is anything but inflexible and with it I was able to come up with a working prototype very quickly just by moving a few things about and reversing my roles.

So before I had DA.pm as a role. I change that to a class

Perl QA Hackathon report - part 3: Net::SSH::Perl v2

This year at the Perl QA Hackathon I had three topics: benchmark update Perl until 5.24, enable CPAN test reporting on L4Linux, release a Net::SSH::Perl v2 to CPAN.

Part 3 - Net::SSH::Perl

I am co-maintaining Net::SSH::Perl, though usually I just apply patches that come up on RT or github.

Some months ago Lance Kinley implemented modern ciphers like AES, more key exchange algorithms, etc. on github - however he started from a CPAN .tgz snapshot. With the help of E. Choroba I got Lance's history rebased to my repository. However, I was short on time and wanted to do release polishing during the hackathon, and so I did.

The only trouble I had was that another patch from Brad Lhotsky which I merged earlier did conflict with Lance's changes in a way that I could solve in a git way but some tests kept failing and I did not understand why.

To be sure to not screw things up I had to give up merging and only released Lance's extensions to CPAN as a new major release v2.01.

As a side effect I also uploaded another new module from Lance, Crypt::OpenBSD::Blowfish, to CPAN.

If you are a user of Net::SSH::Perl please test if it works.

Virtual Spring Cleaning (part 7 of X) Wherein I Enter the Archives

Originally written for providing installable themes for my photo publishing app, App-imagestream, I wrote two modules that make it very easy to provide a basic theme for a web application in an archive. This still allows for quick customization by overlaying the contents of the archive with the contents of another archive or a directory in the file system.

Storable security problems and overlarge data

Some people might be aware that we (not p5p) fixed Storable already for the most egregious security problems with Storable, with public CVE, explanation and metasploit module, but those bugs are still in Storable as on CPAN and in the latest perl5.24.

Now a new problem arose on the horizon, that p5p dares to fix another bug, the inability to store overlarge strings. Which would be okay if they would have taken our fixes, which fixes the security problem and all overlarge data >I32, which are arrays and hashes also. But they didn't, so I have to complain again. People apparently don't like me to complain about p5p mistakes, but you should be concerned what p5p is doing.

See perl #127743 for the wrong fix, adding 2 new ops, where only one is needed, and this fix only fixes a third of the overlarge problem, and not the security problems. There's no need for them to deviate from the API with a worse fix.

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.