RPerl in Paris - Part I

The RPerl team is back! On November 21st, Will "the Chill" Braswell gave a presentation to the Paris Perl Mongers, at the Fondation pour le Progrès de l'Homme, or FPH. For those of you who've been to Paris, it is located in the Bastille area, not far from the opera house. The Foundation exists thanks to the generous legacy of Charles Leopold Mayer, and hosts a Linux meeting every Thursday. We were able to use this place thanks to Emmanuel Seyman, member of the Paris Perl Mongers, who organized this meeting.

The bullet points of Will's presentation were:

- The RPerl compiler, how it works, what it does
- Cloudforfree.org, a free platform to write code and use the compiler
- The Perl 11 philosophy, and the various projects among the open source community based on its principles

Many thanks to the Perl Mongers who joined us, Sébastien Aperghis-Tramoni, Laurent Rosenfeld (author of Think Perl 6), Jean Forget, and of course Emmanuel Seyman.

We'll be back at the FPH soon...


Moose Still gets a A

It is follow-up day here in the Moose-Pen

Having gotten 100% in Database::Accessor it is time now to see what my coverage level with Driver::DBI. On the first run I got;

Thanks for Imager::File::WEBP

Thanks TONYC for authoring and releasing Imager::File::WEBP

All three major browsers now support WebP in a backwards compatible way, so with a few small changes to our Imager scripts our webpages can load faster and bandwidth be used more efficiently. Huzah!

PostgreSQL 11 Server Side Programming - Quick Start Guide

Last week my book PostgreSQL 11 Server Side Programming Quick Start Guide was released.


The book is a Quick Start Guide, that means it goes straight to the point, in this case, programming on the server-side of PostgreSQL.

Why is this related to Perl?
Well, one very cool feature of PostgreSQL is the capability to execute functions, and therefore triggers and procedures, in pretty much any programming language available out there. And this of course, means Perl!
In fact, Perl is very well supported in PostgreSQL to the point that the DO statement does allow you to use PL/Perl code instead of the PL/pgSQL one.

The other language I show, as a "foreign" language, in this book, is Java. My idea was to show to the readers the differences between using a language like Perl and one that requires a full compile-deploy cycle.

Hope the book can be useful.

namespace::local above, below, and around

My namespace::local module has got some new switches in v.0.04:

  • -above (0.04) emulates namespace::clean:

    package My::Package;
    use Lots::Of::Imports; # imports will only be available until end of scope
    use namespace::local -above;
    sub do_things { ... }; # this will not be hidden
  • -below (0.03) hides everything that follows it from outside view:

    package My::Package;
    sub public { ... };
    use namespace::local -below;
    sub private { ... }; # not available outside this module
  • default mode still confines imports and/or functions between the use line and end of scope:

    package My::Package;
    # cannot frobnicate here
        use namespace::local;
        use Some::Crazy::DSL;
        frobnicate Foo => 42;
    # can't frobnicate here, too

I also added a list of symbols that this module shall not be fiddling with, which is most likely incomplete.

Still it looks more like an Acme:: toy, to be honest. Who needs to hide their private functions? Just document the public ones to the point where nobody cares to look inside! =)

Have fun.

A++ Moose

Still in cover mode here in the Moose-Pen

I found another sub that was not being tested seem I never call 'da_warn' in my tests.

This one is a little special;

        sub da_warn {
           my $self       = shift;
           my ($package, $filename, $line) = caller();
           my ($sub,$message) =  @_;
           warn("$package->$sub(), line:$line, $message");
it is in 'Database::Accessor::Roles::Driver' so not really part of Database::Accessor but as it is in the Accessor.pm file I think it should be tested. I have to set it up first by adding this line into the 'Database::Accessor::Driver::Test' class;

Monthly Report - November

I would like to dedicate November 2018 to the London Perl Workshop 2018. The main focus was LPW, being member of LPW Organizers. Lots of preparation went in the background to make it such a successful event. Kudos to all fellow members, community members and sponsors.

Two things are common in every monthly report and I can't live without it. One, submitting Pull Request as many as possible and second daily uploads to CPAN, as of today, 1st December 2018, is the 468th day non-stop. Post LPW event, I blogged about my experience as usual but I also talked about new ideas we (Ferguson, Rick and I) discussed. Since nothing has been finalized, it is not fair to talk about it. Just to give an idea, we talk about how to bring in more people into the Perl fold, specially school and college levels.

Rakudo.js mini update - Firefox support

One pain point when showing Rakudo.js was that it depends on a new version of Chrome due to using not yet everywhere native JavaScript big integers.
It turns out Perl 6 developers use a much wider array than your average Joe, so I decided to spend some time to support Firefox (which has a BigInt implementation under way) as well as all the bizare Chrome offshoots which might use an older V8.
I've transitioned from using the not yet avaliable everywhere native BigInts to using the replacement jsbi.
As jsbi is fresh technology porting rakudo.js even uncovered a bug in jsbi which I reported (and it got fixed by maintainers),
Once BigInts are everywhere we can transition back to using them.

namespace::local: hiding utility functions in moo[se] roles

Ever since I came up with namespace::local, clearly inspired by namespace::clean, I was wondering who would need it in real life.

Now I seem to have found an actual application: roles. Roles must be very careful about what's in the namespace to avoid conflicts. So any private subs that are there to reduce repeating code should ideally be hidden from external observer.

And it is possible with namespace::local -below. The below switch is introduced in 0.03, and it allows the names defined below the use lines to propagate above the use line, but not past the end of scope. This can be seen as namespace::clean working in opposite direction.

Example: if you comment both use namespace::local lines, this code blows up.

LPW2018 Silver Sponsors

Without the investment from our sponsors it would not be possible to run LPW as a free event. We’re grateful for the support at a Silver level from the following four awesome companies!

Here at Adestra we empower our clients to maximize marketing ROI through email-driven technology. Our flexible account structure, obsession with customer success, and award-winning service have gained the trust of global and growing brands alike.

We’re proud to say we treat our people well: from excellent opportunities for career development to a positive, collaborative culture and great company perks, our global offices are a fantastic place to work at any stage of your career. As our client base continues to grow, we’re looking for talented individuals who share our values to come and grow their careers with us. With opportunities in the UK, Australia, and North America, now is an exciting time to join Adestra and become part of our global success.

London Perl Workshop 2018 - Report

DBD::Oracle 1.76 released

Including a wide range of bug fixes and some helpful enhancements as detailed in the Changes file.

If you are using DBD::Oracle, there is no reason not to upgrade (YMMV)

Check it out https://metacpan.org/release/ZARQUON/DBD-Oracle-1.76 or using your preferred CPAN tools

Tackling Legacy Projects: an Experience in Perl - Free Ebook

There are several definitions for legacy code that have similar points, but overall people interpret the notion in different ways. For some it’s code without unit tests, for others it’s old code, for most it’s both. It’s not necessarily something vigorously debated, but opinions differ on what makes code legacy.

In this short ebook you’ll find more than just definitions, but a different perspective on legacy code in general and what it represents for Perl. To make things a bit clearer, the ebook also contains one of our experiences with a Perl legacy code project and the challenges that went with rewriting it.

Have a look!

LPW2018 Gold Sponsor - Eligo

Be generous, but not very

This is another blog post based on my experiences of validating user inputs. Here is the previous one, where I argue against the use of "eval".

"Be generous in what you accept" says the adage. I want to argue that generosity works sometimes, but it's all too easy to be generous to a fault, and cheerfully responding to nonsense input is a losing battle. The problem with being too generous is that you end up correcting or even rejecting the slightly poor inputs in a flawed quest to make sense of complete drivel.

DuckDuckGo and MetaCPAN

Not sure where the fault lies, but all DuckDuckGo search results pointing at MetaCPAN pages have as summary the bottom text about StickerYou.com, Google searches are not similarly afflicted, as they show a more appropriate summary.

meta::hack 3 wrap report

We had a blast at the latest meta::hack and we got a lot of work done. Our "greatest hits" have been documented here.

The Exception That Rather Proves the Rule

I had really wanted to stay out of the recent commentary on CGI. I really did. I was going to be able to until a recent article was published in which the authors try to step in on the side of CGI. I believe the authors to be talented perl developers posting in good faith, but the result really pushed me to reply. The application developed as a case for CGI and preventing “overkill” is a perfect example of why a framework is needed.

Don't use something or another

Seems like a lot of people are keen on telling us not to use CGI.pm, but rather use something else. These discussions seem to verge on religious fervour, with each side finding small problems with CGI.pm or its alternatives, and then telling us that these small problems are actually the end of the world.

I don't use CGI.pm, I haven't used it for at least ten years, and I'm not about to defend it, but since we're all telling people not to use something, I thought I would chip in with something which I don't think you should use.

Since about 2006 I've been running a web site which offers to convert Japanese numbers into other kinds of numbers, and vice-versa. For most of those years until relatively recently I was using Lingua::JA::Numbers by Dan Kogai. Dan Kogai's module uses a methodology of converting the numbers by changing Japanese numbers into digits then sending the digits into an "eval" statement to compute the numeral value of the numbers:

Modern Perl CGI

The contemporarily unique strengths of CGI as a deployment strategy are that CGI scripts ⓐ can just be dumped in the filesystem to deploy them and ⓑ do not have any of the issues of long-running processes: they tie up no resources when not in use and are extremely reliable because of the execution model, in which global state always starts from a blank slate when serving a request and there is no process that outlives the request and could wedge itself. Anyone who consciously chooses CGI over alternative deployment strategies nowadays probably has a fire-and-forget use case where the script will be seeing too little traffic to be worth any effort to tend to it regularly.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.