Perl Koding

Ever seince I started using a Chromebook I have been interested in the concept of cloud-based IDEs for development. I am disappointed with Codenvy.com's lack of Perl support in their runtime containers and IDE, but it's technically possible to develop Perl apps on their platform.

I recently heard about Koding.com. I signed up and was delighted to discover native Perl support in both their default runtime container and IDE; with support for syntax highlighting and code completion. I cloned an existing Git repository, and I felt almost like I was working in a normal linux environment (albeit, in the cloud from a web browser).

If you don't mind using my referral (free RAM upgrades for me)...
https://koding.com/R/zjtzjt

Dancer2 Named Route Parameters

If you're familiar with Dancer2 (my favorite Perl web framework to date), you know how amazingly easy it is to develop self-describing routes for your web application.

Let's say you have a Dancer2 app that allows your users to manage their phone numbers in a 1:X relationship. You might want to expose a route like...

post '/user/:user_id/phone_numbers/new' => sub {
    my $user_id = param 'user_id';
    # Do some stuff
};

... to add a new number to their profile. Let's also assume you have a route upstream that prohibits users from accessing routes associated with other users:

What I learned at Perl MiniConf


I attended Perl MiniConf last saturday and learned a great deal. I have had a pause account since the NYC Perl Hackathon 2015 event ( May 2nd 2015 ) and because of this I decided to take brian d foy's "Become a CPAN author in 3 hours" training. It was a very smooth and eye opening experience ( I was expecting a CPAN Module upload to be a bit more complicated).

Here's a list of things I took from brian's training:

Mojo::Snoo v0.10 - "Snoo" Explained

Hi everyone,

I recently attended Miniconf in New York at which I decided to host a hackathon for my current hobby project, Mojo::Snoo - a Mojo wrapper for the reddit API.

Some hackathon attendees were nice enough to contribute code and give me some great ideas for future development. So, I’d like to briefly mention some changes introduced in the v0.10 release.

Firstly, let’s get one thing out of the way:

What the #$%! is Snoo?

Snoo is the name of reddit’s alien mascot. You know, the white alien at the top of reddit.com:

snoo.png

Not to be confused with “snu-snu” from Futurama.

death by Snu Snu.jpg

According to reddit’s most recent license changes, reddit API wrappers cannot contain the word “reddit”.

Thus, Mojo::Snoo was born.

New features and changes

Moving on - I’d like to summarize some changes made recently and share some quick examples:

  • ojo::Snoo

Choose your YAPC Europe favourite talks

The web conference software that the Perl community uses mostly (Act) has a nice feature that lets registered users to mark their favourite talks. You just have to choose a talk from the list and then add it to your favourites.

This feature has several benefits that may seem obvious but are important anyway:

Thus, please help make YAPC Europe in Granada a big success and choose your favourite talks. Thanks!

Perl Golf at YAPC::Russia 2015

The after-story about the Perl Golf contest, which took place during the two-day YAPC::Russia conferece in Moscow

Perl Golf is a contest, where participants solve the task with the shortest Perl programme possible. This year's Golf rules were announced by Vadim Pushtaev right after the conference start.

You can find a formal desciption and all the received solutions in the YAPC_Russia_2015_perl_golf GitHub repository.

Running plenv 𝘢𝘯𝘥 perlbrew

So I just went to investigate switching from perlbrew to plenv.

This has failed before, because I run an old and grungy installation of Perl where I didn’t set up a local lib and just installed whatever without keeping records of which installed modules I need and which are just junk I tried for a few minutes. Unless I carry forward all that junk, I can’t switch perls without breaking all my local scripts – and I have better things to do.

Eventually I want to fix this situation, but no today on which it comes up has been the day for it so far.

Still, I do want to upgrade to 5.22 now that it’s out, and I’ve been wanting to switch to plenv for a while. What to do?

Uhm… *looks around*
ln -s ~/perl5/perlbrew/perls/perl-5.16.1 .plenv/versions/5.16.1
La la la… *walks away*

Yup, plenv global 5.16.1 is fine with that and a plenv rehash later, it works.

I threw out the rest of perlbrew, just kept the directory tree for the linked perl installation, and now I happily run this bastard/cuckoo setup. Teehee.

Now for installing 5.22 and making all my stuff work with it…

Testing and Validating HTML Templates

Here’s a little trick I’ve been using for a while to help ensure that a large sprawling Catalyst application always generates valid HTML. The idea is to unit test all your templates: the trick is to make it really easy with a helper class:

Strawberry Perl 5.22.0.1 released

Strawberry Perl 5.22.0.1 is available at http://strawberryperl.com

More details in Release Notes:
http://strawberryperl.com/release-notes/5.22.0.1-32bit.html
http://strawberryperl.com/release-notes/5.22.0.1-64bit.html

I would like to thank our sponsor Enlightened Perl Organisation for resources provided to our project.

Mojo::Snoo - alpha release

Hi everyone,

Long time no blog. I posted on reddit about my new module, Mojo::Snoo. I'm shooting for a funky Perl wrapper around the reddit API. Right now, I'm the only one using it (I think), but would like that to change.

So...feedback welcome! Install, break, complain, etc.

Oh, and I will be hosting a hackathon at Miniconf this weekend in NYC. So, feel free to say hi and help me with some development.

Links:
http://www.reddit.com/r/perl/comments/38eca1/feedback_welcome_mojosnoo/
https://github.com/aggrolite/Mojo-Snoo
https://metacpan.org/pod/Mojo::Snoo

Bounty for fixing CPAN modules

Yesterday I had this idea of creating a site where people and companies could offer bounties for fixing specific bugs in a piece of open source code. Then I ran a search and found Bountysource .

I wonder, have you or the company where you work ever used it? Would your company be ready to offer bounties for fixing specific issues in a CPAN module or even in core perl? (bugs or new features alike.)

Would such bounties be a better way for TPF to spend their grant-money?

Hubble, Bubble, Toil and Trouble: Catalyst, Bootstrap and HTML::FormFu

I thought I would share a little trick I use to get these three complex and idiosyncratic frameworks to play nice with each other.

Catalyst and HTML::FormFu are a powerful combination that allows you to tie the form displayed by your view to the form processed by your controller. This direct link means: 1) your field names in your generated HTML will always match the field names used in form processing, 2) default and redisplay field values set by your controller will always match up with the values displayed by the view, and 3) any constraint or validation issues detected by the form processing logic in your controller can be directly associated with the fields displayed by your view. Without this link, keeping a form defined in our view in sync with the form defined by our controller is a large source of potential bugs.

In this presentation that I gave at MadMongers last month, I...



In this presentation that I gave at MadMongers last month, I show you how to use AngularJS as a front-end to your Perl backends. Presentation files available as well.

[From my blog.]

Adventures in Dist::Zilla (among other things)

(Wow, has it really been almost 6 months since I last posted here?  Man, I’m slacking ...)

A while back, I decided to play with Dist::Zilla, and one of the first things I decided to do was make my own plugin bundle.1  Now, if you don’t know what a plugin bundle is ... well, that’s a bit above and beyond the scope of this article.2  Suffice it to say that, if you want to get the most of out DZ, you want to create your own plugin bundle.  (And, if you don’t want to do that, then you probably want to be using something simpler than DZ, like Dist::Milla or Minilla or Zilla::Dist.)

So I created one a long time ago but then I never did much with it.  I personally don’t have enough CPAN distros to juggle to make spending a lot of time fiddling with DZ a priority.  But lately I’ve decided I want to get back into it.  So I started out by installing the latest version I’d put out on CPAN.

Well, trying to install it, anyway.

New module, Role::Pg::Sequences

Blog about it

MetaCPAN Welcomes Liquid Web as a Hosting Sponsor

MetaCPAN would not exist as we know it, if it weren't for our sponsors. I'm particularly happy to say that we have some incredibly supportive hosting sponsors who understand our needs and provide us with the gear that helps us keep up with our demand.

Introducing Test::Requires::Git

Git is a wonderful tool, and there are a lot of git wrappers written in Perl on CPAN. They all depend on running git in their test suite.

Test::Requires::Git offers a simple way to declare which versions of git a test depends on, so that it can be skipped if the available git does not match the specification.

Veure: Artists and Narrative Designers

This has been a busy week with Veure. As usual, my daily routine is:

  • Wake up
  • Hack a couple of hours on Veure
  • Work for $client
  • Have dinner
  • Optionally hack more on Veure

Hack, in this case, does not simply mean "write code." There are many other things involved, including research, research, and more research. And legal stuff. And writing. And hiring.

Yes, hiring. For example, we think we've found a great artist. If it works out, we can replace my crappy concept art of a space station:

New ships can be done, new background graphics, and so on. In fact, this could turn into a full-time job for him if Veure is successful. But that's not all we're hiring.

CPAN PR-Challenge: May Report

Somehow I missed to post my April report. Don't remember well what was the PR. It was something basic, as I lack the time for real work.

This month I prepared a Pull Request on removing HTML from result entries obtained with WWW::Wikipedia. Now, waiting to see if it gets merged. It seems I have no luck on my PRs to be merged...

MetaCPAN Thanks Bytemark for Two Years as a Hosting Sponsor

Today I'd like to take a moment to recognize Bytemark, which has been a MetaCPAN hosting sponsor for over 2 years now. When our original hosting sponsor was no longer able to support us, we found ourselves in a tight position. We had 30 days to find a new solution in order to keep MetaCPAN online. Thanks to a very quick response from Bytemark (and Mark Keating, who helped us set up this arrangement) we had a seamless transition to our new host and new hardware.

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.