Perl Advent Calendar 2016

Perl Advent Calendar 2016

  1. Graphing Moose Classes Automatically – Meta::Grapher::Moose
  2. Jingle Refs, Jingle Refs, Jingle all the way – Ref::Util
  3. Benchmarking with Bencher – Bencher
  4. Yuletide Logging – Log::Any
  5. Gathering all the Presents – List::Gather
  6. Help Santa Klaus Reward Only Nice Children -Schedule::LongSteps
  7. Writing git hooks with Git::Hooks – Git::Hooks
  8. Geocoding the world at volume with open data – Geo::Coder::OpenCage
  9. Too Many Choices For Santa – Params::Validate::Dependencies

C::Blocks Advent Calendar 2016

C::Blocks Advent Calendar

Perl is great, but sometimes I find myself reaching for C to do some of my computational heavy lifting. There are many tools that help you interface Perl and C. This module differs from most others out there by providing a way of inserting your C code directly where you want it called, rather than hooking up a function to C code written elsewhere. This module was also designed from the outset with an emphasis on easily sharing C functions and data structures spread across various packages and source files. Most importantly, the C code you see in your script and your modules is the C code that gets executed when your run your script. It gets compiled by the extremely fast Tiny C Compiler at script parse time.

  1. Weaving procedural C code into your Perl code
  2. How to get data across the boundary between Perl and C
  3. How to get data across the boundary between Perl and C for a number of types, including packed arrays
  4. How to declare and use C functions and declaring C functions that can be used throughout your code
  5. Benchmarks

See also C::Blocks

How to build a base module

How to build a base module

When working on large Perl projects, a base module is a nice way to setup a standard set of imported routines for the other modules in the project. With a base module you can configure a logger, turn on pragmas and import any other useful routines.

See also Import::Into

shellcheck – a (online | cli) shell linter

shellcheck – a (online | cli) shell linter

ShellCheck is…

  • GPLv3: free as in freedom
  • available on GitHub
  • already packaged for your distro or package manager
  • supported as an integrated linter in major editors
  • available in CodeClimate and Codacy to auto-check your GitHub repo
  • written in Haskell, if you’re into that sort of thing.

Available on GitHub

Write Perl XS modules in Swift

github.com/my-mail-ru/swiftperl

swiftperl is designed to provide an easy and smooth interoperability between Swift and Perl languages. The primary goal is to write XS modules for Perl entirely in Swift, though running Perl interpreter in Swift environment is also possible.

Testing with AppVeyor

Testing with AppVeyor

If you ever wanted to test your CPAN modules on Windows systems without having an own Windows system setup, then you should take a look at AppVeyor. Basically it’s something like travis-ci, but just running on Windows. Configuration happens in a YAML file named appveyor.yml.

See also

PDL appveyor.yml on github

sending email with TLS (in Perl)

sending email with TLS (in Perl)

Every once in a while I hear or see somebody using one of the two obsolete secure SMTP transports for Email::Sender, and I wanted to make one more attempt to get people to switch, or to get them to tell me why switching won’t work.

Setting Up Local Mail Delivery on Ubuntu with Postfix and Mutt

Setting Up Local Mail Delivery on Ubuntu with Postfix and Mutt

Works pretty well. The only change I had to do was to remove/purge and reinstall postfix first:

sudo apt-get remove postfix --purge
sudo apt-get install postfix

The MIT License, Line by Line

The MIT License, Line by Line

If you’re involved in open-source software and haven’t taken the time to read the license from top to bottom—it’s only 171 words—you need to do so now. Especially if licenses aren’t your day-to-day. Make a mental note of anything that seems off or unclear, and keep trucking. I’ll repeat every word again, in chunks and in order, with context and commentary.

CPAN Tutorials

CPAN Tutorials

The CPAN allows you to easily download, install and use Perl software packages on your system. The software package is called a distribution and contains a Perl application or library.

A collection of tutorials on using and writing CPAN distributions. Hosted on GitHub.

  1. CPAN basics
  2. What is a CPAN distribution
  3. Make your own CPAN distribution
  4. Publishing your CPAN distribution