Making Baby Moose Better
Its Moose day here in the Moose-Pen today.
Still playing about with re-factoring things before I move along too far and what I wan to fix today is this block of code;Its Moose day here in the Moose-Pen today.
Still playing about with re-factoring things before I move along too far and what I wan to fix today is this block of code;In this article I'm going to show you how to specify dependencies for your CPAN distributions: the other Perl and CPAN modules that your distribution relies on. This is the fourth article in a series. The first article gave a general introduction to distribution metadata. The second article introduced the five phases for which dependencies, or prerequisites, can be specified. The third article presented the types, or relationships, that can be specified for each dependency.
This article is brought to you by cPanel, Inc., a Gold sponsor for the Perl Toolchain Summit. cPanel are a well-known user and supporter of Perl, and we're very grateful for their support. More about cPanel at the end of this article.
In April, Google announced that Google Chrome was finally supporting headless mode, at least on Linux and Mac OS. Back then, I noted to myself that this might be a good time to revisit my rough prototype of WWW::Mechanize::Chrome. According to Git, I had written a first prototype of it in 2010 which used the old, raw socket protocol. But time has progressed and the protocol now uses Websockets. My original approach used AnyEvent, so I quickly replaced my own approach using AnyEvent::WebSocket::Client, and the HTTP parts with Future::HTTP.
Hey everyone,
Following is the p5p (Perl 5 Porters) mailing list summary for the past two weeks.
Enjoy!
It a little re-factor days here in the Moose-Pen
So just a quick re-factoring post-ette now that I have the basic CRUD working.
This line of code
my $field = $self->get_element_by_name(sub {$_->name eq $key});
was bugging me a little. You really have to have to be a fairly experienced Perl programmer before this type of call is second nature, or you have to be a real fan of List::Util to have this sort of call in you bag of tricks. So I think I will tone the level of this one down a little.
This means going back into Database::Accessor yet again and this time I will change only Database::Accessor::Roles::Common by first doing this;
http://stackoverflow.com/questions/43814055/easy-to-check-if-user-input-is-a-number-in-perl
points us to this Perl FAQ:
http://perldoc.perl.org/perlfaq4.html#How-do-I-determine-whether-a-scalar-is-a-number%2fwhole%2finteger%2ffloat%3f
Unfortunately, the regular expression part of the above FAQ page is wrong. \d doesn't validate numbers, unless you have already verified that your input contains only ASCII characters.
What \d does is to validate whether a number is regarded as a numeral in Unicode. For example, \d will happily match things like U+07C2: '߂' NKO DIGIT TWO, or 096F: '९' DEVANAGARI DIGIT NINE, and 360 other characters which are not valid as numerals. If you need to use a regular expression to validate whether something is a number, use [0-9] to match digits, not \d.
The reason I'm aware of these defects in the use of \d for validating numbers is because of having used it to validate user input at the following web pages:
Perl short string implementation is interesting.
This decrease memory accesses when string is short in 16-bit.
Or 1.002000, because it uses Moo-like versioning.
The Type::Tiny 1.1 (1.001_00x) development cycle has been going on since September 2014. Apparently I'm either very concerned about stability or very lazy. You can make up your own minds about that.
But Type::Tiny 1.2 should be released in a few weeks. If your application uses Type::Tiny, you may want to download the latest development release and check that nothing breaks. (It shouldn't, but you never know until you try.)
The headline changes are:
compile_named and validate_named.constraint parameter may be a string of code.I'll explain the first two in more detail, because they're interesting.
It if put the 'D' in CRUD day here at the Moose-pen.
So yeaterday I fininsed off Retreive/Select after I pulled a few hairs out trying to debug and issues that was not there I thouhg today I wiyld finish of my CRUD subs by doing the _delete sub today.
At least this is the most simple of all four functions as there is not need to iterate over fields or contrainers so the code is just;Everybody knows that Perl is not the right language for a large scale enterprise application. This is common knowledge, right? But why is that? Explanations are as many as there are people explaining. Everything from "it's a script language, therefore slow" to "its free syntax breeds discoherence" to "Perl developers are horrible individualists".
Well, I didn't believe this, and I went on to help in a startup which wants to build some fintech systems, the first aim of which is to integrate with Finnish banks and collect daily payments from a customer's bank account.
It was decided to use Perl as the core language. If Perl is (was) good enough for Goldman Sachs and Morgan Stanley it surely is good enough for us. So off to build a framework!
It's been a 100 weeks since the Perl5 to Java compiler started.
The compiler is now "good enough" to translate itself to Java.
The Lab::Measurement project provides Open Source control of test & measurement devices with Perl. On our recent poster, which was presented at this year's DPG Spring Meeting of the Condensed Matter Section, we mainly discuss the high-level aspects of Lab::Measurement necessary to perform highly complex measurement tasks with simple scripts.
Now, the topic of this post is the CPAN release of Lab::Zhinst, which provides a Perl5 interface to devices from Zurich Instruments, a vendor of fast digital lock-in amplifiers, phase-locked loops, arbitrary waveform generators, impedance analyzers, digitizers, and boxcar averagers. There is no doubt about the excellent performance of their hardware. But when it comes to their approach to measurement automation it very much differs from what is commonly provided by Test & Measurement equipment. Let me explain by comparing their proprietary approach to the existing open interfaces. These open interfaces make it possible to control test & measurement equipment with general-purpose programming languages, like Perl, Python, Java, Ruby, Scala, or what have you.
Well if carry on as if you are normal day here in the Moose-pen
In yesterday's post I manged to get the update sub working with a real DB and today I am going to try the 'retrieve' sub which is a little more tricky.
The basic concept is much the same as for the other two and it really did not take me long to get it up and working, the only real gaff was this one
Subroutine _select redefined at
as I had a stubbed in version that I simply got rid of. Apart from that and the sact one does not spell alias as alais things when together quickly and here is what I have;
The 19th German Perl Workshop will take place in roughly two months time in Hamburg. The German-speaking Perl Community will meet from the 26th to the 28th of June 2017 in the "Bürgerhaus Wilhelmsburg".
Mojolicious::Plugin::INIConfig catch up Mojolicious 7.31.
Mojolicious 7.31 removed some DEPRECATED methods.
I fixed test and release Mojolicious::Plugin::INIConfig 0.04.
Enjoy!
So I wrote a guide on how to get paid more by understanding technical hiring processes:
https://www.slideshare.net/perlcareers/get-paid-more-the-anatomy-of-a-technical-hiring-process
Its get more done day here in the Moose-Pen
Now that I have got 'create/insert' to work in yesterday's post I think I will move on down the line and get the next one easy one to work 'update'.
This first thing though is to get rig of this waring;
Commit ineffective while AutoCommit is on-1 at D:\GitHub\database-accessor-driver-dbi\lib/Database/Accessor/Driver/DBI.pm line 64
ok 1 - Create function
nothing major really the waring is perfectly harmless but I could see some people getting annoyed at that and the fix is simple, if the DBI 'AutoCommit' flag is set don't try and commit. So here is that change;
$dbh->commit()
-- unless($self->da_no_effect);
++ if ($dbh->{AutoCommit} == 0 and !$self->da_no_effect);
Hey everyone,
Following is the p5p (Perl 5 Porters) mailing list summary for the past week and a half.
Enjoy!
While we are all looking forward to the Perl Conference in Amsterdam, it is time for the venue committee of the YAPC::Europe Foundation (YEF) to think about the location of the 2018 conference. So if you always wanted to invite the European (and International) Perl Community to your hometown for three days of massive Perl, drop us a line at venue@yapceurope.org.
More information is available at the YEF website.
We are excited to announce The Swiss Perl Workshop 2017. This year the workshop will be held in Villars-sur-Ollon, in the French speaking part of Switzerland. The workshop will be in English.
The workshop will take place on Friday 25th and Saturday 26th of August 2017. You can find information on getting to Villars-sur-Ollon and places to stay on the workshop website.
Please spread the word, register, submit talks, and come enjoy a perl workshop in the mountain air. Oh, there will also be beer/wine/drinks and pizza from the real pizza oven at the GivenGain office (although we need to do a test run first).
Thanks to our sponsors:
OETIKER+PARTNER | Perl Careers | GivenGain
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.