Absolutely ages ago, I took over maintainership of RTF::Parser. Grand plans abounded, but mostly what I ended up doing was fixing a few of the more outrageous bugs, and made it use the much more sensible RTF::Tokenizer as its back end.
People still use RTF::Parser, and a couple of other modules on CPAN use it, but I really can't give it the love and care it deserves. The code is mildly crazy, there are age-old outstanding bugs on rt ... this Xmas, will you take in a deserving module?
If you've had a look at search.metacpan.org, you may have noticed that some of the author pages have more info than you might find at search.cpan.org. Take, for instance, FREW's author page. You'll see that it has links to his blog, Twitter, StackOverflow, website etc. Lots of information there which allows you to find his various online presences without having to do all too much digging around.
If you'd like to expand your author info, it's pretty easy. We don't have a login for you yet, but this is a trivially easy stop-gap solution to get yourself up and running:
You're writing Perl code in vim and have just typed a package name - maybe you
want to create an object of this class:
some_statement;
my $o = Some::Class->new;
do_something_with($o);
You obviously need to write use Some::Class at the top. So you either move
the cursor near the top and add the line, then jump to the previous line
number, or maybe you split the window, move to the new viewport, make the
change, then close that viewport.
On Twitter, Curtis Poe (@OvidPerl)
posted some
interesting and unintuitive Perl code; I've slightly reformatted it and changed
some values for the sake of the following discussion.
use Data::Dumper;
sub boo { 4,5,6 }
my @x = ( boo() || 5,8,7);
print Dumper \@x;
What do you think this prints?
Let's look at some simpler examples of code:
$ perl -le'@x = (4,5,6,7,8); $y = @x; print $y'
5
An array like @x, in scalar context, evaluates to the number of elements in
that array. In this case, @x contains five elements.
As I promised, here are the slides from my talk this morning at Saint Perl-2 in Saint-Petersburg, Russia.
I believe Morpheus can be very useful for the community and hope that it'll become widely adopted.
There are still a lot of things which can be added, but conceptually we are on the right track.
These slides probably suck (I wrote them in the last moment and didn't put enough details in some places), but putting code out in the wild and getting feedback is more important by now.
One more thing, if you're going to check out PODs in next few days, see them on github instead of CPAN. There are much more of them added in 0.36 release, which is not uploaded to CPAN yet.
UPD: Just found out that 0.36 release docs can be viewed here: http://search.cpan.org/~mmcleric/Morpheus-0.36/
Morpheus::Key, Morpheus::Bootstrap and Morpheus::Plugin::Content PODs are worth to be looking at, if you are interested in implementation detals.
By week i mean 7 days in which I touched the tablets.
Basically i just read the advent calendar and other sources and check if the tablets missing something. This way Appendix A has 25 entries more, much more revamped finding even keyword fossils of ancient Perl 6, not even known to moritz++, jnthn++ was helpful too. Also wrote the section about quoting and some minor parts of tablet 3.
Other than then I wrote last week an article for the next (10th) Perlzeitung about basics in Perl testung, because even beginners can't start too early with that. Since Perl's official Testing site lies pretty dormant I maybe take the brush to sweep there some things. but hej bigmouth I dont even got time follow properly p5doc and still in the starts for my thingy for the perl ecosystem group (still a seakrit). But my anger toward that subject rises. Any other volunteers for that out there?
For a distribution that is built using Dist::Zilla, it is very easy to install all the dependencies:
dzil listdeps | cpanm
dzil listdeps will almost build the distribution so it can determine the prerequisites and then list them each on one line. This list can be passed directly to cpanm.
Just another day at the office moving databases into MySQL. 10 lines of DBIx::Class::Schema::Loader make_schema_at() and I'm done. :)
Usually.
Unfortunately today the table names "Order" and "Service-tier2" blow up:
Bad table or view 'Order', ignoring: DBIx::Class::Schema::Loader::make_schema_at(): DBI Exception: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Order WHERE ( 1 = 0 )' at line 1 [for Statement "SELECT * FROM Order WHERE ( 1 = 0 )"] at refresh_schema.pl line 9
Apparently "Order" is semi-reserved by MySQL, and dashes are trouble:
SELECT * FROM Order # syntax error
SELECT * FROM `Order` # works
SELECT * FROM Service-tier2 # syntax error
SELECT * FROM `Service-tier2` # works
Another point for irc.perl.org #dbix-class, as ilmari pointed me to quote_char as the cure for what ailed me.
In my last post, I explained how to get an AnyEvent->timer to work in a Dancer application.
There’s nothing wrong with timers, but if you are using AnyEvent, you usually have to deal with CondVars. There are two things you can do with a CondVar: Either you register a callback which will be called when the CondVar is triggered, or you call recv and it will block until the CondVar is triggered. In a route of your Dancer application, you probably want to block until you got all the data you want to display to your user.
Take the following (made-up) example which uses a CondVar:
Our 2011 January meeting will feature Greg Lindahl speaking about blekko. Location forthcoming.
blekko is a new Web-scale search engine, offering focused searching using "slashtags", which enable you to restrict search results to the specific sites of actual interest. We'll use some open-source slashtags as examples. The rest of the talk will focus our implementation of the search engine and the underlying NoSQL database using Perl+XS, Map/Reduce done better, tuning Linux for good performance, etc.
Greg Lindahl is CTO at blekko. He was previously a founder at PathScale, where he was the architect of the InfiniPath low-latency InfiniBand HCA, used to build tightly-coupled supercomputing clusters. Prior to PathScale's founding in 2001, Greg worked on commodity Linux clusters at HPTi, including the 1999 Forecast Systems Lab system, which was the first time a Linux cluster won a conventional supercomputing procurement. Greg first used Perl before the Camel Book was written. Perl: the swiss army chainsaw of programming languages!