Perl 5 Porters Mailing List Summary: February 7th-12th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

Dist::Zilla Disclaims

Well it is section end day here in the Dist-pen.

Today I am looking at the I think the last section plug-in the [WarrantyDisclaimer] plug-in. This is your standard blurb type plug-in that will dump a bunch of legal words that is suppose to cover your arse if someone uses you code to control a self-driving car that goes berserk and crashes into a children's hospital causing a fire as the cute puppy store.

This plug-in has a number of subclasses that you can use to match up the license you are using to the correct subclass. So far there are six sub-clases

  • Default
  • Artistic
  • Custom
  • GPL1
  • GPL2
  • GPL3
Myself as I am using the GPL 3 so in my 'weaver.ini' file all I need to add in is

Our Adventures in Logging

NB: I've written a follow-up post

Before we start: this is my first post at blogs.perl.org. Awesome that you're reading it despite me being a noob! :)

Three years ago, I started to change the way I think about logging in applications. Before that, to me it was just printing lines into text files, in order to later read and grep my way through them.

Then, a friend pointed me to ElasticSearch and Kibana, with its infinite ways to search through, and visualize, large amounts of textual data. Due to the nature of my $work, I was well aware of the benefits of a full text search database, however, it soon became clear that text alone was only part of the deal. The real fun in ElasticSearch begins when you add structured data into it, allowing filtering, grouping, and get all businessy with pie charts and world maps and whatnot. This would be where you'd start to gain knowledge that wouldn't be available anywhere in text-based logfiles.

Outthentic - quick way to develop users scenarios

Whether you are operations guy, devops or developer from time to time you deal with scripts development for various tasks - handy utilities, automation scripts, monitoring tools, so on.

Outthentic - is universal, language independent framework to encourage scripts development in easy and fun manner.

Here is short introduction into it - "Outthentic – quick way to develop users scenarios".

Forthcoming site downtime

The blogs.perl.org site will be unavailable for a few hours during the night of February 16th to 17th 2017. The site will stop responding at approximately 21:00 UTC on the 16th, and is expected to be back by 05:00 UTC on the 17th.

The reason for this downtime is that the data centre where the site hardware is hosted is being closed, so our hosting company is transporting all servers in that data centre to a new location.

We apologise for any inconvenience caused.

Dist::Zilla Templated

Well it 'T' day here at the Dist-Pen

Getting near the end of the section plug-ins I am looking at the [Template] plug-in. This one is much like the [GenerateSection] plug-in I had a look at in this post.

To use this plug-in to generate the same section I created in the other post above

=head3 Database::Accessor Tutorial 
Welcome to  Page xxxxx
I will first have to create that in a file with the {{}} in the right spots. So I created the file 'header.section' with this content;

Welcome to Page {{$name}} of the {{ $main_module_name }} tutorial.

Test::BDD::Cucumber and `prove`

Thanks to some sterling work by ehuelsmann, not least of which was badgering me to commit some code, Test::BDD::Cucumber now integrates directly into prove. This means you can run your feature files in parallel, and in a shuffled order more easily. This is a bit of a mouthful to achieve:

prove -s -j 5 -r --source Feature --feature-option extensions=.feature --ext=.feature examples/

and any suggestions on how to make that a little easier gratefully received.

Perl 5 Porters Mailing List Summary: January 30th - February 6th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

About the Perl Toolchain Summit

We've had a few questions and discussions about the toolchain summit since our announcement in January. In this blog post we'll address some of those: why the name change, what things are fair game to be worked on, and who decides who comes?

The Perl Toolchain Summit is the new name of the Perl QA Hackathon, an event organised for the first time by Salve J. Nilsen in Oslo in April 2008. In Salve's words from 2008:  "The purpose of a QA hackathon would be to Quality Assurance-related problems that are easier to solve when everyone is gathered in the same physical location. This can include issues with packaging, testing modules, community support or with tools."

Over time, the event has grown in importance (it is now the major non-conference event of the Perl community), and moved around Europe, organized every year by a different team in a different European city. It is entirely financed by corporate and community sponsors interested in having a healthy and reliable Perl environment.

Dist::Zilla No See

It is the big 'S' round-up here on the Dist-pen today.

Well just a post-ette today as I am a little hard pressed to find things to blog about. I am going to have a quick look at the three remaining section plug-ins that start with 'S'

  • [SQL]
  • [SourceGitHub]
  • [Source::DefaultGitHub]

SQL

This is a neat little plug-in that I might find useful when I go the write up my DAD::SQL. If you wrap any sql in you POD like this

=sql 

SELECT * FROM records where id =1

=cut

A repo for SQL docs

For a number of years Jonathan Leffler has been providing SQL docs, which I hosted on my web site.

At the prompting of Brian Van Klaveren I've converted Jonathan's index.html page into the landing page of a github pages project.

Perl talk at Linuxtag Chemnitz

Its on the 12.03.2017 12:00 in Room V5 and by ... me (you guessed it). It will have a small Perl 5 section handling 5.24 and 5.22 (since i've gone full P6 last year). Ant to not repeat myself i want to go more practical with Perl 6 this time. some nice alorythms and useful modules - answering: what can I do with Perl 6 today.

Automation of ssh/scp commands with sparrowdo

Hi! here is short post on how to automate ssh/scp commands using sparrowdo - configuration management tool, written on Perl6.

https://sparrowdo.wordpress.com/2017/02/01/sshscp-commands-with-sparrowdo/

Regards.

Alexey

Dist::Zilla Looks Elsewhere

Well it is look elsewhere day here in the Dist-Pen today

Getting closer to the end of the road for Pod::Weaver::Section plug-ins I only have a few more to look at so I am going to look first at the ones I might find useful and then do a final wrap up of all the left overs.

Today I am going to look at the [SeeAlso] section plug-in. Fort my Database::Accessor project this might be a good one to have in there. As I will have a number of extra content I might want listed someplace, like links to the tutorial and manual and perhaps a link to a few DADs or a search for DADs

This plug-in does give you a number of options on how to enter the data for the section blurb. The most badsic is to add in the section your self in you pod and then the plug-in will convert them to a list.

For example if I enter this

So I Guess I'm Back

Hi… remember me?

Been away a while, and now I have a whole heap of bug reports to get through. But you, dear reader, I'm giving the inside track. If there's a bug in one of my modules and you want me to prioritize it, comment below.

Also, how are you doing?

I'm good.

c:

Turkish speaker needed

A very kind person has submitted a Turkish translation for FormFu.

We're hoping another kind Turkish speaker could find a few moments to read over the submission and check it's good to go.

PR at -> https://github.com/FormFu/HTML-FormFu/pull/43

Not Comparing The Way You Meant

Here’s another example of code taken, terrifyingly, from a script that a contractor was paid cash money to write. The contractor’s code included a script to remote into another system and perform a command. Most systems required ssh, but we had some older systems that required rsh instead. So the contractor made a configuration file that contained client definitions:

  {
     "ferrari" : {
        "method": "ssh", "ipaddr": "10.26.101.92"
     },
     "yugo" : {
        "method": "rsh", "ipaddr": "10.25.34.112"
     }
  }

In the script, he looked up the client in question, and put its configuration into variables like $method. So far, so good. But here’s the code that decides which access method to use:

  if (method == "ssh") {
    do_ssh($ipaddr, $command);
  }
  else {
    do_rsh($ipaddr, $command);
  }

So this code omits the sigil on $method—problem #1—and thus treats method as a bareword (i.e. the literal string "method"), then compares that to the literal string "ssh", but does so NUMERICALLY—problem #2. Since both are non-numeric strings, they are both treated as 0, and the comparison is always true. Needless to say, this script did not turn on warnings or strict mode—problem #3. Luckily, the vast majority of our critical systems required ssh, and on those systems, three wrongs made a “right!”


Dist::Zilla Needs Support The Second

So part two of support day here in the Dist-Pen

In my last post I had a look at the [Support] section plug-in and now I am going to have a closer look to see if I can create my own custom version of it.

The first thing I want to do is get rid of the 'perldoc' blurb and I can accomplish that by simply making that attribute false (0) in my 'weaver.ini' file

[Support]
++perldoc = 0
[Legal]
'Bugs' is the next blurb that I am looking at and I should be able just to turn it on by specifying that I want to use the 'metadata' rather than the default 'rt' so all I need to do is

Perl 5 Porters Mailing List Summary: January 23rd-29th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

Emulating Just About Any RESTful JSON API

At YAPC::EU 2016 I gave a talk on my approach to developing code against RESTful services. The talk starts out a little silly, but my aim was to show some of the frustrations that can arise when developing aforementioned code. My conclusion is that you should write an emulator for any service you are developing against. Not just that but release an emulator for any RESTful APIs you are developing for others so they can trivially test their client code.

Of course I am a developer so inherently lazy, and being a perl developer I am especially lazy. Having done the emulation dance for at least three modules I've written I suggested I would write something to make this easier. I managed to find some time last week, amongst our annual developer's conference, to do this.

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.