Posts tagged perl
There are two answers guaranteed to show up on nearly every PHP question on Stack Overflow - use the mysqli/PDO extension instead of the deprecated mysql one (to avoid SQL injection), and that you can't parse HTML with regular expressions.
With that in mind, my favorite two answers:
- [How PDO is still vulnerable to SQL injection attacks](http://stackoverflow.com/questions/134099/are-pdo-prepared-statements-sufficient-to-prevent-sql-injection/12202218#12202218) by Anthony Ferrara
- [Parsing HTML with regular expressions](http://stackoverflow.com/questions/4231382/regular-expression-pattern-not-matching-anywhere-in-string/4234491#4234491) by Tom Christiansen
Sep 24th: The silver searcher is basically ack, rewritten in C to be crazy fast. If you're regularly using grep to search a codebase, this is probably a much better idea.
it's now over 8 years old, but the 12 views of mjd is still good reading
just added a quick little hack over on my code site for finding out which imap folders are using up your quota
the cpan testers matrix is a really good tool (especially for a cpan tool) - an at-a-glance report of how well your various modules are testing (and motivating me to fix the failing ones)
i didn't realize there'd be so much movement on rakudo. it's looking pretty snazzy
kellan points out this interesting old TPJ article on problems with localization and gettext. the solution isn't really any good, but the problem is real
aside from the final calculation being highly dubious, the perl module dependancy viewer is pretty neat
remotely set the 'ready' message on networked HP printer using some perl. been playing with this in the office to nice effect
get it while it's hot - the perl color ascii art library
i need to take a look at the gnupod module to see if i can hook up ipod play counts to lastfm for better stat tracking
aaron points out the Acme::DRM module. read the method descriptions carefully - brilliant.
annopan is an annotation engine for cpan. part of me is thankful for the service, but i mostly wish search/rt/anno/testers/forum/backpan/ratings were a single product.
mike b pointed me to this bizarre article from IBM's daniel sabbah describes lamp as "going to have to grow up at some point". err, right. because lamp clearly doesn't scale. it's not like the biggest websites in the world use it. ryan tomayko's response is on the mark.
wow. i totally have a debian package. in STABLE ffs.
those scamps at oreilly are publishing a perl style guide by sir conway - must be required reading.
schwern's post about JSAN is pretty interesting. especially the loading-direct-from-repos stuff. mmmmm
i'm currently rewriting the X:P:L:T:X module using the CADT model, but i have an excuse. as it, it can't really toke properly and gets too confused. a new tokener is done and seems to be working. just need to tree it and evaluate it.
aaron spotted this little gem of perl wisdom. crazy stuff.
Acme::JavaTrace might actually be a useful acme perl module. oops
i present a short lession in turning RFC BNF into perl regular expressions: Parsing Email Adresses in PHP
excellent news - nick clark has started work on ponie again, and there's a detailed roadmap
an excellent slide from autrijus' perl 6 talk at yapc::taipei. i'm going to keep that one in mind for future presentations.
in hammerseley's etcon talk at the moment - he's recommendeing Lip::Pod for documentation love.
aaron points out that cpan search has maintainer independant urls for modules, for even better linkage than version independant ones.
tom insam does good presentation slides. i will bear these in my if i get round to doing slides for etcon.
php in perl. excellent. now to make the flickr core even more confusing ^_^.
a while ago jimmy o'regan wrote a nice article for linux gazette about using flickr with my perl api module.
the porter stemming algorithm in perl - bookmarked for later programming fun.
damien popped up on p6l to talk about parsing of perl6 and gave this excellent one liner:
$parse_tree = ( $source_text ~~ m:keepall/ <Perl.prog> / );
which is very nice - a full adaptive parse tree including comments, whitespace, etc.
'it'd be nice if stock Perl 6 ran blazingly with perfectly consistent and flexible semantics, but it's also important to have a knob you can turn up that says "Damn the torpedoes, full speed ahead!"'. larry talks about speed vs features for perl 6.
the flickr mt plugin is pretty awesome, using not only Flickr::API, but also my XML::Parser::Lite::Tree and XPath modules. code resuse strikes again!
Inline::Parrot looks like fun. not on cpan yet, but probably will be soon i expect.
sean o'rourke points out a nice way to get a perl shell. now why isn't there a Perl::Shell module to do the same thing without all the line noise? a CPAN-esque "perl -MPerl -e shell" would be nice.
a vaguely interesting perl5 oo syntax filter module (though no standard build/install process, which sucks ass). i prefer luke's Class::Closure.
a new version of perl6 synopsis 5 (regexps) is out. must read it.
i didnt realise that mjd's perl newbie rants were a segment of yapc 2002 the movie
scary goings on in th p6i world - jospeh ryan explains how to inline prolog in perl 6 using macros and the cross-language eval statement.
PAR looks really good. it's a JAR-like packaging system for perl apps. must investigate tomorrow.
a new perl module: XML::Parser::Lite::Tree::XPath . my first foray into xpath backends. docs are here. should reach cpan later today.
playboy run a cpan mirror. bizarre
steve fink is documenting his quest to write a regexp compiler in parrot. the three days logged so far make for interesting reading.
there's a discussion happening on p61 at the moment about multimethod dispatch on return continuations. this sounds like pretty crazy at first, with fungeoid implications, but could lead to some very nice debugging hook oppertunities.
nick clark pointed out acme::intraweb. both a beautiful name and a beautiful implementation. top marks.
pointed out on p6l - xquery uses smilie faces for it's comment delimiters. the current suggestion is that p6 should do the same. even if it doesn't, one could write the grammar for it easily.
the ever-lucid MJD has some advice for newbies in this short video.
a very nice explanation of continuations and saving state: say you're in the kitchen in front of the refrigerator, thinking about a sandwitch. you take a continuation right there and stick it in your pocket. then you get some turkey and bread out of the refrigerator and make yourself a sandwitch, which is now sitting on the counter. you invoke the continuation in your pocket, and you find yourself standing in front of the refrigerator again, thinking about a sandwitch. but fortunately, there's a sandwitch on the counter, and all the materials used to make it are gone. so you eat it. :-) by luke palmer (i'm turning a bit fanboyish)
Class::Closure is a piece of genius from the indispensable luke palmer. it let's you quickly define classes in perl5 using a regular OO syntax, including inheritance, constructors, destructors, properties (private, read only, simple, get/set), methods and autoloading.