I finally (well a few days ago) had a response to another of my questions up on gitihub;
-->me
I added in th status as you suggests. I found it under botocore as "location":"statusCode", It is used in a number of other classes
-->they
This means that we can make the builders put the trait on the appropiate attributes, which I see you already found ?
-->me
I added it in as a new trait as you suggested, not 100% sure on the name though
-->they
I think the name would better be ParamInStatus (just as a reflex of the other traits).
-->me
please have a look and see if I am on the right track.
-->they
I think you're on the right track ?
So I have switched over to my 's3ObjectTagging' branch and I think I all have to do is change the name of my trait from 'ParamInResponse' to 'ParamInStatus' which I found in three files and did a simple change and then reran the test and got;
The London Perl Workshop is today! If you can make it, hopefully you have already planned your journey there - please remember we're at a new venue this year. If you're thinking about your journey home, after the event we are going for after drinks, with food provided by our sponsors at the Running Horse in Aldgate. We'd like to thank our last gold sponsor Eligo for their continued support of London Perl events.
Eligo are a niche boutique recruitment consultancy with a team of dedicated Perl Consultants. We live and breathe our markets. In fact we like to think we are as passionate about the sector as those who work within it. If you want proof of it stop by and meet Rick Deller one of our Senior Perl Consultants at LPW today.
The Camelia mascot of the language now known as Raku is a brightly coloured metaphor for the transition from Perl 6 to it's new identity. My hope is that having emerged from it's cocoon, Raku will flap it's wings and fly skyward, boldy seeking new adventures.
I congratulate the team for making this decision, specifically Elizabeth Mattijsen for being so bold as to propose the change request that triggered the end game. No doubt other people where involved that I am not familiar with, they deserve generous praise and recognition too.
My personal involvement in Raku/Perl6 is literally zero. So I make this post as a person for whom Perl 5 continues to be a delight for personal projects, and sadly declining professionally.
Reading through the public comments there are a lot of strong feelings - some of them hurt feelings. Humans are fundamentally emotional creatures, and the grief associated with strong disappointment follows the same path to acceptance no matter how rational a person fancies themselves.
Well I though I hit the correct fix when Paws does its XML parsing and drops the 'Root' node but I found I have to apply some sort 'trait' to my class rather than an attribute so I am going to start this time with my code for 'RestXMLResponse.pm' first and then work that fix back into boto and the templates.
Our small team really enjoys organizing the mostly-annual DC-Baltimore Perl Workshop, and we're working on it again for 2020 (NOTE: CFP IS OPEN!!! http://bit.ly/dcbpw2020-cfp). We get a lot out of it, both technically and socially.
One aspect of the joy comes embracing ALL sorts of technology, from Arduinos to rockets, from compilers to web apps. So with the recent update in the Perl-Family languages of Perl 6 → Raku ... we took this as a fun time to update our own name!
We shall be henceforth known as the DC-Baltimore Perlyglot Workshop! Coming to you live on April 18-19 at Johns Hopkins University, just north of Baltimore, MD. I sure hope you'll join us :)
It's Wednesday today, which must mean it is time to think about the weekend :-) If you are planning to come to the London Perl Workshop on Saturday, you might like to know that we'll be serving tea and coffee at registration from 9:15, with the first talk starting at 9:50. There will also be a mid-morning and mid-afternoon break with tea, coffee and some delicious snacks and all of this is only possible due to the support of our sponsors. Today we're saying thank you to cPanel - we are grateful to have them as a gold sponsor of LPW2019.
First released in 1997, cPanel & WHM is the leading web hosting control panel globally, and is preferred by most hosting service providers. Its users in an ever-growing user base prefer its familiar, feature-full, and simple interface. This interface can be used to build, manage and update a company's their entire online presence, from websites to email addresses.
I've been working with Sawyer X and Stevan Little to try to bring OO into the Perl core. Most of this work is based on Stevan's work, with me trying to add a final "polish" layer to make it clean and still feel like Perl.
It's being called "Cor" to distinguish it from current OO systems.
In my last post I got nicely snookered by the S3 call 'GetBucketLocation' which was one of the call that had a 'todo' test.
The XML coming back from ASW is correct
<?xml version="1.0" encoding="UTF-8"?>
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-0301/">
EU
</LocationConstraint>
but no matter what I tried on 'XML::Simple' I could not get it to parse just the way I want though I did get very close with this
Spoiler Alert: This weekly challenge deadline is due in a few days from now (October 20, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.
Challenge # 1: Sunday Christmas
Write a script to list dates for Sunday Christmas between 2019 and 2100. For example, 25 Dec 2022 is Sunday.
Christmas on Sunday in Perl 5
I'll be using the Time::Local core module which provides reciprocal functions of the gmtime and localtime built-in functions.
Write a script to demonstrate brace expansion. For example, the script would take the command line argument Perl {Daily,Weekly,Monthly,Yearly} Challenge and should expand it and print like below:
You’ve probably heard about the glob function. It can expand wildcards like * or ?, so you e.g. can easily check what files correspond to p*.p?. But glob can do one more thing for us: brace expansion.
I am in favor of this change, because it reflects an ancient wisdom:
"No one sews a patch of unshrunk cloth on an old garment, for the patch will pull away from the garment, making the tear worse. Neither do people pour new wine into old wineskins. If they do, the skins will burst; the wine will run out and the wineskins will be ruined. No, they pour new wine into new wineskins, and both are preserved."
Well carrying on with my quest to clean up the Paws S3 code I decided while I am waiting for my last batch of changes to be reviewed I decided to review some of the 'TODO' tests.
TODO passed: 6364, 6370, 7896, 10045, 10052, 10137
First a 'TODO' test is a stubbed in test that will most likely fail and if it does it will not effect the final Pass/Fail of test case. It is basically one of these
The first one I am going to play with is 's3-get-bucket-location.response.test.yml which looks like this
---
todo: 'S3 is not stable'
call: GetBucketLocation
service: S3
tests:
- expected: EU
op: eq
path: LocationConstraint
So the first thing I did was chop off that 'todo' line;
---
--todo: 'S3 is not stable'
call: GetBucketLocation
service: S3
…
and then check the content in the '3-get-bucket-location.response';
SPVM is Static Perl Virtual Machine. I write an example to sum even numbers with precompiling.
Using precompiling, the source code is output to C source code and it is compiled to machine code. This performance is same as C language in add operation! You are surprised.
Anyone have information on the current and future status of Stratopan?
Still marked a "Beta", the latest perl version is stuck on 5.27.2, the blog.stratopan and cpan.stratopan http sites error, and the https version redirect back to www.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (October 6, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.
Challenge # 1: File Type
Write a script to check the file content without explicitly reading the content. It should accept file name with path as command line argument and print “The file content is binary.” or else “The file content is ascii.” accordingly.
I left off in my last post with all my bits and bods to get the proper structure in my generated perl class from the Json data. Now I have to get the 'status' out of the response and then into my class.
By now I know where to start to look to in the code to apply my changes. I started in Paws::Net::RestXMLResponse' class at its 'process' sub which looks at the response 'status' and takes either the error path (>=300) or the happy path (<300). We are interested in the happy path and that takes us to the 'response_to_object' sub.
First I can see that I have the 'status' very soon in the sub;
Happy Friday! If you are coming to the London Perl Workshop tomorrow, or even if you can't make it tomorrow but are in London today, you are welcome to join the pre workshop social this evening from 18:30 at The Draft House, Seething Lane.
The first few rounds will be courtesy of our fantastic sponsors, so today we'd like to thank Pirum for coming on board this year as a gold sponsor!
Pirum is a small dynamic FinTech company established in 2000, which provides Software-as-a-service the top-tier financial institutions in Securities Lending throughout the world.
Write a script to check the file content without explicitly reading the content. It should accept file name with path as command line argument and print “The file content is binary.” or else “The file content is ascii.” accordingly.
Frankly, I had no idea how to solve this. I had to google the solution, and I was quite surprised Perl had the operators designed for exactly this purpose. During my approximately 20 years of Perl programming, I’ve never needed the -T and -B operators—probably because all my scripts and programs expect either a text or a binary file as the input, and it’s upon the user to provide it in the expected format.
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
say 'The file content is ', (-T shift) ? 'ascii' : 'binary', '.';