Something New Every Day

Just now, while attempting to do

print "$user's crontab is missing!\n"

I got the error “Use of uninitialized value in concatenation (.) or string…”, and after a bit of testing, I discovered that “$package'varname” is apparently an alias of “$package::varname” (in my case, Perl was trying—and failing—to print $user::s).

Did everyone else know this? This is literally the first time I have run across this in almost 20 years of Perl programming

(Of course a quick Google search turns this up in the opening paragraphs of the perlmod docs—I wonder if it’s time to read all of that stuff cover-to-cover?)

Alien::Build vs. Alien::Base::ModuleBuild

I have been working on the next generation of Alien::Base installer which is called Alien::Build. It is already quite usable, and I encourage it's use for anyone who is considering building a new Alien modules. It may also be useful to migrate existing Aliens, if they have requirements that can utilize its unique features. The main idea is to concentrate the recipe for discovery and building of a library into an alienfile which is separate from the Perl installer (usually ExtUtils::MakeMaker or Module::Build). Over the next few weeks I intend on writing a little about some of the new features of Alien::Build. In the meantime, if you are interested, Alien::Build::Manual::AlienAuthor may help you get started.

Perl 5 Porters Mailing List Summary: March 13th-21st

Hey everyone,

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

Enjoy!

TVPM Tech Talks in Reading, UK

On Monday 27th March, the Thames Valley Perl Mongers (TVPM) are having a mini tech talks session in Reading. Talks are going to be about 15 minutes each. Speakers and topics are given below, along with details of the venue.

Any and all are welcome to join us.

Perl is dead

Again...I guess this trope is something Perl developers just have to accept as we keep coding our Perl modules and scripts.

The eigenvector of "Why we moved from language X to language Y"

Wrapping a C shared library with Perl and XS

This tutorial shows how to wrap a C shared library using XS and Perl (including creating a trivial test shared library).

The first 3/4 is the actual wrapping itself. The second part includes the C code and build commands to create the trivial shared library used in this tutorial.

Relatively, I am still very new to all of this, as it's a pretty complex world. Before I started, I didn't have any real C experience, so I've been dealing with that learning curve at the same time, so I know there are better and more efficient ways of doing what I do, and would appreciate any feedback.

I'll get right to it. Here's an overview:

DBIx::Custom 0.38 release - Delete DEPRECATED features before 5 years


DBIx::Custom 0.38 is released. I have deleted DEPRECATED featreus before 5 years.
If you use DBIx::Custom before 5 years, Please take care of updating.

This release performance is up.

DBIx::Custom 0.38

I will add SQL creating feature, database async query support, much faster DBIx::Custom Fast.

Changes

The list of DEPRECATED featreus.

Perl 6 book

Reading the description of the new book, Think Perl 6, I see one line "how to program and think like a computer scientist" and in the same week I hear from a friend of mine trying to get into the gig economy and the only jobs he can bid on turn out to be someone's CS assignment. Me starts to think that one way for profs trying to curb students' tendency to False Laziness would be to set assignments in Perl 6, provided they are willing to pick up the language themselves.

There are other approaches. My sibling's prof taught them C in the time it took to say "Your assignments will be submitted in C".

Just a thought.

Google juice

I find it such a pity that after so many years of work on MetaCPAN by so many contributors it still accounts to 27.3% only of the total CPAN traffic.

Maybe if more people were linking to pages of MetaCPAN from their own blogs in the relevant context.

For example if you write about databases and Perl you could link to the Perl DBI for Database Access. When you talk about AJAX and JSON, you could mention JSON and Perl. If you are talking about Dates or Timestamps, you could mention DateTime in Perl.


Or any other module that is relevant to your blog post.

AWS CodeBuild

I've been playing with Amazon's CodeBuild for Bedrock's CI/CD pipeline.

Some gotchas but CodeBuild is cool.


http://openbedrock.blogspot.com/2017/03/aws-codebuild-howto.html

Metric Time in Tau Station

If you've been following our progress with Tau Station, you know we're creating a science fiction universe in Perl for people to enjoy. As of this writing, the time in Tau Station is 194.10/51:647 GCT.

"GCT" stands for "Galactic Coordinated Time" and that's a variant of metric time. As a software developer, I wish we had that in the real world, but alas, we don't.

The GCT time listed above is roughly 194 years and 10 days after the "Catastrophe" (an apocalyptic event that effectively serves as our "epoch"). There are 100 days in a year, 100 "segments" in a day (14.4 minutes each) and 1000 units in a segment (.864 seconds each).

I love the fact that figuring out the display time for GCT is this simple:

my $days = sprintf "%9.5f" => $seconds_since_catastrophe / $second_in_a_day;
$days =~ m{^(?<year>\d+)(?<day>\d\d)\.(?<segment>\d\d)(?<unit>\d\d\d)}a;
my $gct = "$+{year}.$+{day}/$+{segment}:$+{unit} GCT";

Perl 5 Porters Mailing List Summary: March 6th-12th

Hey everyone,

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

Enjoy!

Perl6::Tidy initial release

Perl6::Tidy has been released to GitHub, not on the ecosystem yet. The driver program is 3 lines, mostly passing options to the tidier. Which is 6 lines, doing the real grunt work.

It doesn't do much yet, but it's pure Perl 6.

Raspberry Pi becoming more prevalent?

The last half-year or so, I've been hacking on different Integrated Circuits, various small hardware, learning how to wrap specific C software (while ensuring the code remains within the Perl license) in order to bring the Raspberry Pi toward the realm of reasonable Perl programming.

I have written numerous pieces of software to allow this. The first was WiringPi::API. This is the core wrapper that allows you to use the wiringPi library right from your Perl scripts.

I pushed this further with RPi::WiringPi, which is an object oriented wrapper for WiringPi::API, but performs important benefits; it registers pins so you can't re-use them by 'accident', and it does an auto-cleanup (ie. it resets everything back to non-dangerous state) on failure. It also allows you to pull in other RPi-type objects and use them directly.

With the different ICs, hardware, etc that the RPI:: scope encompasses, I've finally run into a situation where I can't effectively ensure the quality of it all.

My First Articles

It's my first articles in blogs.perl.org

Dancer2 0.205000 improves application speed, deprecates request->dispatch_path

Dancer2 0.205000 is on it’s way to CPAN, and brings with it a number of bug fixes, documentation improvements, and enhancements. The changes with the most potential impact to your existing applications include:

[Off topic] PHP syntax is (version && context) dependent

PHP accepts or rejects certain syntax depending on the context.

Let's hope you never have to deal with things like this.

Shire Calendar Update

I have recently adopted modules Date::Tolkien::Shire and DateTime::Fiction::JRRTolkien::Shire.

The releases to date have been relatively minor fixes, but the development releases of a couple days ago are more significant, to the extent that I thought users of these modules should get a "heads up."

  • Common code and data have been factored out into Date::Tolkien::Shire::Data. This module also provides time formatting, allowing the implementation of a strftime() method in both the original modules.
  • The direct conversion of dates between Gregorian and Shire in both modules has been replaced by calculations in terms of Rata Die days. Regression tests have been provided (in xt/author/regression.t) to try to ensure that this did not break anything.
  • DateTime::Fiction::JRRTolkien::Shire has been provided with most of the DateTime interface. The known missing pieces are:
    • Duration and date arithmetic. I hope to add this in a subsequent release.
    • format_cldr(). I am not sure whether this will be added or not; at the moment the implementation path is unclear to me.
    • era(), which is marked as deprecated in the DateTime code.

I can not imagine that there are any mission-critical uses of these modules, but interested parties should probably take a look at the revisions, and let me know if anything untoward turns up.

Tom Wyant

That moment when your auto-scaling, self-healing servers and...



That moment when your auto-scaling, self-healing servers and continuously integrated and continuously deployed codebase all start working together seamlessly and flawlessly. 

If none of that made any sense to you, then just understand this: 

muhahahahah! *rubs hands together while laughing maniacally*

[From my blog.]

Perl Developer Survey 2017

We’re doing a survey for the entire Perl community to find out some specifics and peculiarities about Perl and more importantly, about Perl developers. The survey itself is meant to gather some perspective regarding how developers are using Perl, where are they using it and how Perl is used with other technologies. This is basically a State of Perl in 2017 survey.

The survey will be open from the 7th of March to the 14h of April.

Please share it within your local Perl communities, every answer counts and makes this survey more relevant. The results will be available for the entire community to see, we will publish them the following week after the end of the survey. The data acquired through this project will show just how Perl is used and how the developer community is presenting itself at this point in time. It has 31 questions and it covers personal programming preferences, employment facts, geographical criteria, community events, tech stack data and more.

This is a great opportunity to capture the state of Perl as a language and as a community.

Join us to paint the picture of Perl in 2017!

Fill in the survey here!

Don’t forget to share!

Originally published on Builtinperl.com

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.