And one more for luck

For today's MooseX I was having a look at  MooseX::ShortCut::BuildInstance which was one of the last ones on my initial list.

So this MooseX required me to almost as much jigging about as in my last post and I had a few false starts on it implementation as the documentation is sparse as are examples, but none the less I did manage to get something up and running in my DA.

So to start I again has my DLS class in a separate file and I set that up as the shortcut maker. So all I needed to do was this

   package   DA_SC::LSD;
    use Moose;
    use MooseX::ShortCut::BuildInstance qw(  build_instance should_re_use_classes);
    should_re_use_classes( 1 );
and then in my retrieve sub of DA I did this

How about separating dynamic world and static world?

I write comment before topic. Please see it.


Current subroutine signatures implementation contains two features which purposes are different

My opinion is that argument count checking by subroutine signature is not fit to Perl because Perl is dynamic language.

Perl is dynamic language, so argument count checking is done in run-time, not in compile time. This damage to performance of subroutine call.

Perl one big problem is that subroutine call is slow. If this is improved, Perl have big benefit.

"sub foo($x, $y) { ... }" should be faster than "sub foo { my ($x, $y) = @_ }"

Many existing projects will use subroutine signatures not worrying about performance damage.

How about separating dynamic world and static world?

By the way, I am reading cperl specification by Reini Urban. This is very interesting.

He want to introduce many static features to Perl. This is mainly performance reason.

Outthentic expansion

Hi!

This is a quick post on latest Outthentic changes going to be released in the nearest future. Not going into technical details, I would gladly say that:

  • Outthentic is turning into "Multipurpose scenarios framework" meaning not only test or reports scripts, but ANY scripts or scenarios could be written on this tool.

  • Outthentic is getting language agnostic tool ( but it is still written on Perl ! ). Now one may use Perl, Bash or Ruby to extend basic DSL, see a lot of examples here and a heavily updated documentation here

All these features are kinda under active development, but one may play with developers version installing from the github source code.

Regards

--- Alexey Melezhik

Android App with the Perl5 to Java compiler

We've had another hackathon at work.

Yati, Bas, Luca and I hacked on the Perlito Perl5-to-Java compiler and also a bit of Perl5-to-JavaScript.

The changes are in GitHub and will be published in the next CPAN release.

The latest cool addition is an Android App example:

And the Winner is? (well maybe anyway)

Today I started taking a closer look at MooseX::RelatedClasses to see if that could help me out. Well after reading though the documentation and looking at the test files to see how it really works I do not think I need this MooseX at all as it really is just for coordinating name-spaces, So I will move onto the next one for today and that is MooseX::Scaffold

This one does look promising as I can use one common sub to load in my LSDs when one of the DA CRUD commands are issued with all the correct attributes I need.

This one did call for a rather large redesign of how I put things together;

First I had to take the DA_S::LSD out the DA pm file and put it in its own file LSD.pm and in that I added the Scaffold code like this

QA Hackathion in Rugby, Warwickshire, 2016

This year I discussed less and got more focussed on one thing, namely PAUSE, thanks to the kisses of the muse we got flooded with, that is Kenichi, Neil, Matt, Peter and me. Thanks to that, PAUSE is, I daresay, in a better shape than ever before and definitely on a good track towards the future.

Here's a short run down on my activities at the QAH in Rugby:

Fixed a bug discovered by Leo Lapworth in rrr synchronization: it turned out that a crontab item got mangled recently.

Joined the Test2 discussion.

Set up a smoker run for 5.18.4 with the Test-Simple releases 1.302014_001..7.

Finished the pre-Hackathon activities on getting the Perl Authors Upload Server (PAUSE) to work with two separate puppet instances, one for the system operation team, and one the application (together with Robert Spier).

Added sysv startup gears for the new plack-driven PAUSE server and fine-tuning configuration (together with Slaven Rezić and Kenichi Ishigaki).

Reflections on Test2

In a future post I will recount the details of my delightful experience at the 2016 Perl QA Hackathon (N.B. now published here). Since this is my first post since that time I do want to tip my hat to the great sponsors of the event and to my own employer ServerCentral without whom I would not have been able to attend. I will thank them in more detail in that post.

Before I get to that however, I want to post a reflection on one discussion that is and has been weighing on my mind since then. That topic is the upcoming release of Test2, which I consider to be a very important step forward for Perl’s testing architecture.

Available for Perl Work

Hi All,

I am available for Perl work. I can work remotely or locally in the
Boston area. Also I can be on-site a reasonable amount of time depending
on travel logistics.

You can see my design and coding skills on CPAN (id: URI).

Damian Conway said this about me in his acknowledgements in Perl Best
Practices: "To Uri Guttman, for seeing things no one else did, in ways
no one else could."

If your Perl team is large enough (say > 5 or so), one of the best ways
to use my services is supporting your team with code review, optimization,
and related skills. This can be a part time deal and your team
will get productivity gains greater than the time invested.

Here are my areas of interest and expertise:

Architecture, Design, Development
Code Review, Mentoring, Refactoring
Optimization, Scaling
ETL, Parsing, Data Munging, Templating
Networking, Communications, Dataflow
Documentation, Specifications

You can reach me at U r i AT P e r l h u n t e r .com or call me at
781-643-7504.

As a bonus, let me know if you want a preview or to be a tech reviewer
of my article on dataflow architecture.

thanx,

Uri

Moose Relations

So after yesterdays re-loadfest of getting all my win- registry in order, downloading the latest Strawberry perl, upgrading Moose and getting all the other perls in a row. I tried to work on my DA again and got

Class::MOP::load_class is deprecated at C:/Dwimperl/perl/site/lib/Class/MOP.pm line 69

yet agin.

Well this time I took the time to look at the rather shortened message, only about 15 lines compared to about 120+ for the first time I tired these new MooseXes so at least some things have been fixed up.

Anyway I spotted the problem seems 'MooseX::Role::Parameterized::Meta::Role::Parameterized' needed to be updated if MooseX::RelatedClassRoles is going to work. So a quick cpan install and the latest version was up and running. Now I only get
MooseX::RelatedClassRoles::__ANON__::SERIAL::1' requires the method 'LSD_class' to be implemented by 'DA_RC' at C:\Dwimperl\perl\site\lib\Moose\Meta\Role.pm line 472 …

Perl 6: The S/// Operator

Coming from a Perl 5 background, my first experience with Perl 6's non-destructive substitution operator S/// looked something like this:

(artist's impression)

You'll fare better, I'm sure. Not only have the error messages improved, but I'll also explain everything right here and now.

The Smartmatch

The reason I had issues is because, seeing familiar-looking operators, I simply translated Perl 5's binding operator (=~) to Perl 6's smartmatch operator (~~) and expected things to work. The S/// was not documented and, combined with the confusing (at the time) warning message, this was the source of my pain:

my $orig = 'meowmix';
my $new = $orig ~~ S/me/c/;
say $new;

# OUTPUT warning:
# Smartmatch with S/// can never succeed

Applying user-supplied regexes

My first post... not the snappiest title, but here goes...

Multiple Grep and Capture

I have a requirement for a module which performs the following:

Given a client-supplied list of regex patterns, which may or may not capture part of their output

And a search text
When I run my function.
Then return a list of tuples, where the regexp matches the search text. Each 'matching' tuple consists of the regexp, and an array of the captured elements of the text.

Important to note that: * we don't know up-front which regexes will be supplied - only that they should be valid * we don't assume there are any capture groups, but if there are, we would like to hold onto them

First attempt...

for my $re (@regexps) {
    my @captures = $search_text =~ /$re/;
    push @result, [ $re, \@captures ] if $&;
}

Perl 5 Porters Mailing List Summary: April 14th-27th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for two weeks I've missed. Sorry about that. Enjoy!

No News today

Well today’s blog was suppose to be me looking at some of the MooseXs I reviewed the other day. However I seems that Moose has moved quite foreword since the last time I did a new install and it seems I was getting 'Class::MOP::load_class is deprecated' in almost every thing I wanted to play with.

Well had a quick look at my Moose version was quite out of date. I had 2.06 or alike and I see now there is a shiny new 2.2009 release that is less than a month old so in that goes.

Well with the regular rigamarole I tried to reinstall my Moose and it crashed then my Padre stopped working. So I am thinking it is going to be one of those days where not much get accomplished.

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.

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.

Extra-Typical Perl 6

Have you ever grabbed an Int and thought, "Boy! I sure would enjoy having an .even method on it!" Before you beg the core developers on IRC to add it to Perl 6, let's review some user-space recourse available to you.

My Grandpa Left Me a Fortune

One way to go is to define your own custom Int-like class that knows how to perform the .even method. You don't have to reinvent the wheel, just inherit from the Int type. You can mix and match core Perl 6 types and roles any way that pleases you.

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.

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.