More Than one Way to Load a Moose

So from my last post I had to figure out a way to enforce these four rules

  1. All LSD files will be in the DA::LSD name-space or folder if you like
  2. Each DSL has to express which type of driver it expects
  3. Only DSL 'pm' files will be loaded
  4. The loaded DSLs should be cached as loading or at least requiring them may take some time.
The first question is where to do this in the code. Fortunately Moose has a BUILD sub which is the prefect place for this. So we will start with this;

sub BUILD {
    my $self = shift;
    map { $self->_loadLSDClassesFromDir($_) }
      grep { -d $_ } map { File::Spec->catdir($_, 'DA_SC','LSD' ) } @INC;
}

Test2/Test::Builder stable delayed to May 10th

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.

If you find any bugs or issues please report them right away at https://github.com/Test-More/test-more/issues.

The Coro situation

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.)

Perl 6: There Are Traitors In Our Midst!

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:

is export

ᒨᓴ ᐊᔅᐗᔨᑕ

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.

The QA Hackathon 2016 was a great success!

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.

Perl QA Hackathon 2016

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!).

QA Hackathon 2016 in Rugby

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.

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

Virtual Spring Cleaning (part 8 of X) wherein I release leftovers

I have already mentioned it, but I didn't release Template::Provider::ArchiveTar right when I released Archive::Merged even though the two modules are really intended to work in tandem.

My Perl QA Hackathon 2016

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.

My Perl QA Hackathon 2016

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.

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

Need Perl6 modules on Windows then use Zef

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

My Workflow for Building Distros

My Workflow for Building Distros

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.

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 …

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:

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).

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.