Suppose that for some reason you really, really need to introduce a silent, backward-incompatible change for a module. For example, in 0.03 and earlier foo() accepts ($a, $b) as arguments but you need to change it to ($b, $a). After releasing v0.04, you probably also want to break code that says any of the following:
use MyModule; # no version specified
use MyModule 0.01;
use MyModule 0.02;
use MyModule 0.03;
by, e.g., croaking with a message like "Order of arguments of foo() changed in 0.04, please use older version or update your code. Program aborted."
Reading up on "perldoc -f use" and browsing on CPAN, I found version::Limit which does almost that. You can put something like this in MyModule.pm:
I haven't actually started work (I'm not completely stupid!), but I'd like to know if there is any interest in these modules being given some TLC. In this case I think a re-write is appropriate.
I did not trace the pre-reqs, but since I would be using Marpa::R2::HTML to rectify the HTML tags before starting the conversion proper, a C compiler will be needed. A pure Perl solution is out of the question.
For supported dialects I have not decided exactly how to code that, but I have an idea to - perhaps - use a Marpa grammar - an SLIF-DSL (Scanless DSL) in Marpa terminology - to unify them.
So, I'd like to hear from interested parties, both for perceived need, and perhaps for testing.
Also, if anyone's using an alternative, please mention that too in the comments.
Just a follow-up to Stevan Little's On porting a Moose module (thanks Stevan, BTW for this software! :) I read Damien Krotkine's p5-mop: a gentle introduction yesterday, so I took p5-mop out for a spin and started porting my Hashids module to it; Hashids itself is a port of the JavaScript hashids.js library from Ivan Akimov, and provides an easy way of creating "hashes" of alphanumeric strings similar to the ones used in YouTube.
Here are a few things I observed while doing the port, which I'm glad to say, was a very easy and worthwhile thing to do (if at least to help me think about improving my own use of Perl:)
I even posted it to Reddit that got quite a mixed reaction (18 upvotes 11 downvotes) but many of the links were updated.
Of course there is more to Wikipedia than the English version, so I checked the numbers for the 10 languages listed at the top of Wikipedia and these are the numbers:
I have been meaning to write this post for a while, but between $work and getting sick I have not really had the brain capacity to do it. Being that I am still a little sick and $work is still busy, I am making no promises about the quality of this post.
I know I know, there is Email::Sender, and Mail::Sendmail, the 'send' method of MIME::Lite, Mail::Mailer and probably other ones I don't know about on the CPAN and also the good old pipe to /bin/sendmail trick.
Each of them have their advantages, but none of them actually does what I wanted.
Email::Postman does all the following:
- It can send anything that's compatible with Email::Abstract (MIME::Entity, Email::Simple, rfc822 String, etc..)
- It will manage multiple To, multiple Cc and multiple Bcc nicely.
- It will report on each of the recipients individually.
I’m pleased to announce Firebase, a client wrapper around Firebase.com. This is a joint effort with Kiran Kumar.
Firebase is a real-time message queue and data store. It’s ideal for building real-time applications or adding some real-time functionality to your existing applications.
It’s available on CPAN now, so fire up cpanm and check it out.
If not, in a nutshell, p5-mop is an attempt to implement a subset of
Moose into the core of Perl. Moose provides a
Meta Object Protocol (MOP) to Perl. So does p5-mop, however p5-mop is
implemented in a way that it can be properly included in the Perl core.
Keep in mind that p5-mop goal is to implement a subset of Moose. As
Stevan Little says:
We are not putting "Moose into the core" because Moose is too opinionated,
instead we want to put a minimal and less opinionated MOP in the core that is
capable of hosting something like Moose
Helios 2.61 has been released. This is a bugfix release; if you are using Helios and experiencing problems due to one of the (previously) outstanding bugs in the Helios RT, you should upgrade to this version.
The format statement was required in the grammar for completeness. The 'format' command is not supported at the emitter side - it compiles, but it doesn't run yet.
Some other features are still marked as TODO and are simple to implement:
- dot-decimal strings (without the 'v'),
- "'" meaning "::",
- using 'CORE::' in odd places - 'CORE::if' in place of 'if' and 'CORE::and' in place of 'and'.
With these in place, the grammar will be "100% complete" - the tests will eventually tell if we got there or not.
You can master Perl array and hash, and complex data structures, such as array of arrays, array of hashes, hash of arrays, hash of hashes. You master to loop the complex data structures.
If you can manipulate complex data structure, you can do many things in programming. Let's master array and hash.
As you may know, Perl 5.14 (and up) will allow you to use references for container functions (by which they mean functions such as push or keys that operate directly on arrays or hashes). I’d never thought much about this feature, except to think that it was, in general, a nice way to save three keystrokes on constructs such as (to steal an example from perldelta):
keys %{$hoh->{genres}{artists}}
Now, saving three keystrokes doesn’t mean much if it makes your code harder to read. But, in this case
keys $hoh->{genres}{artists}
is actually
easier
to read, so I call that a win-win.
I’ve released SimpleDB::Client 1.0600 to CPAN. SimpleDB::Client is used to connect to Amazon SimpleDB. The only new thing in this release is a command line app called “simpledb” contributed by Andrew Solomon.
A few weeks ago, to the encouragement of Jeffrey Thalhammer,
I contacted the Chief editor of The ChangeLog and offered to write Perl-related articles. He agreed, and since then I managed to post 3 articles. They were about GitPrep, Questhub, and Sqitch.
For now my main focus is to show applications written in Perl that can be used by anyone, even if they are not programmers. Tools that solve problems even non-Perl programmers can have.
Another quick update. We're in the middle of communicating to our (possible) sponsors. Lots of paperwork to do :)
As I already wrote on Hannover.pm gathering v21 (German) we're planing to announce the approximate ticket price within the next weeks. The final ticket price will be available in January 2014 at the latest.
This week I spent some time to fix the remaining p2 parser problems. I set my first goal to parse 50% of perl5 syntax by summer 2013.
I want to show some real code and benchmarks at the upcoming YAPC::Asia in Tokyo.
After the YAPC::EU in Kiev I first spent some time fixing B::C for 5.16, 5.18 and blead (PADLIST, COW and bytecode compiler regressions).
In the meantime my partner in crime goccy in Tokyo made progress with his parser, compiler and the new llvm backend.
His parser is hand-written and I'm still fighting with greg, but my code is still much smaller and more elegant.
Thanks to some pointers by MidLifeXis and Ether it turns out I didn’t need to bump the requirements of Ouch to 5.12 to use overload and parent. Thanks! So this release just goes back to letting you use 5.8 (but you really should upgrade!)
Last night, I gave a presentation for the Madison Perl Mongers group on UAV::Pilot. The video is now up:
This is also the announcement for the WumpusUAV Indiegogo project, which aims to create a new, cheap, hackable UAV platform. More information is on WumpusUAV.com.