I love adding procmail rules, as getting my incoming e-mail almost perfectly sorted eases my life in such a tremendous way – but sometimes that really frightens me.
I just thought, if I ever get around “to it”, I will write unit tests for my procmailrc.
Blog
-
unit tests for my procmailrc
-
Catalyst based CMSs
According to cms.wikia.com/wiki/Impl these are the current Catalyst (so esp. implemented in perl)
based CMSs:Can anybody help me selecting “the right one”?
O, what do I want to use it for?
I got a few web-sites, most of them more or less plain text (HTML!), generated from DocBook, and I want them to look a little more spicy, maybe with a left and a right column and all that.
Alright, coming from DocBook maybe I should also have a look at DocBook website, a variant of DocBook for dealing with websites. But I want to consider the alternatives. -
Polish court to decide on Brodsky
… Polish authorities may deport alleged Israeli spy Uri Brodsky to
Germany this week. … The Brodsky affair has caused friction with two of Israel’s most
important European partners. According to media reports in Germany,
Israel has
turned the diplomatic screws on Poland and Germany to prevent an
extradition of
Brodsky to Germany.
A Polish diplomat told the Warsaw-based Rzeczpospolita daily in June: “If we extradite him, we will anger the Israelis. If we release him, we will anger the Germans.When we discovered this man… we should have pretended that we had not seen him. But now it is too late.”
The federal prosecutor told The Jerusalem Post in June that the matter is based on the forgery of a German passport and illicit secret service activity in the Federal Republic. He insisted that the pursuit of the alleged secret service agent is purely a legal matter, and would not identify the agent as Israeli. …
-
App::perlbrew – Manage perl installations in your $HOME or wherever you want
Prerequisites:- $ zypper install patch
- $ zypper install gcc
- …
Caveat:- yes, “perlbrew install” occasionally and too often needs “–force” and even “–notest“, don’t be too surprised! my “5.14.2” and also my “5.16.1” needed it
- …
Main links:- www.perlbrew.pl
- $ perlbrew
- $ perlbrew help
- http://search.cpan.org/perldoc?App::perlbrew – this one tells you, how to upgrade perlbrew:
$ export PERLBREW_ROOT=/opt/perlbrew
$ curl -kL http://install.perlbrew.pl | bash
# or maybe like this:
$ perlbrew self-upgrade- https://metacpan.org/module/App::perlbrew
- https://metacpan.org/module/perlbrew : list-modules, how to migrate modules together with cpanm, …
- http://www.perl.org/pub/2010/03/testing-perl-5120-rc-1-with-appperlbrew.html (a little outdated)
- Perlbrew and my shebang line [Link]:
The developer/maintainer does not have in mind this use case as the main use case!! But it is my main use case.
What to do after installing a new perl, that you consider your new stable perl?$ perlbrew alias create perl-RELEASE stable
# resp.
$ perlbrew alias -f create perl-RELEASE stable
# use this shebang line with $PERLBREW_ROOT expanded [Link]:
#! $PERLBREW_ROOT/perls/stable/bin/perl$ perlbrew switch stable # this will be our usual starting point!!!
# but “perlbrew list-modules” does not work on such an alias, so “perlbrew use” to a non-alias before!
- Have a serious look at “$ perlbrew help” once in a while!!!
I decided to make use of $PERLBREW_ROOT, as I want to keep my home $HOME minimial, just data and scripts, no big files, they all go to other disks. And right, my home directory is on an encrypted partition, and this sort of stuff certainly does not get encrypted.$ export PERLBREW_ROOT=/usr/local/perlbrew
Therefore my perlbrew is installed as:
/usr/local/perlbrew/bin/perlbrew
They suggest, that my $HOME/.bashrc should “source” their …/etc/bashrc, but for the time being I let my $HOME/.profile do this, as IMHO this is right place.
So actually this is according to best practices for shell programming the right way (for me) to do it, and now this code is of course included in my $HOME/.profile:
# for perl’s App::perlbrew :
export PERLBREW_ROOT=/usr/local/perlbrew # on my Linux boxes
export PERLBREW_ROOT=/sw/perlbrew # on my Mac box(es)
source $PERLBREW_ROOT/etc/bashrc
##export PATH=$PERLBREW_ROOT/bin:$PERLBREW_ROOT/perls/current/bin:${PATH}
path_prepend $PERLBREW_ROOT
path_prepend $PERLBREW_ROOT/perls/current
BTW: always “$ hash -r” after switching, so you avoid getting certain perl resp. perlbrew related error messages like this one and a few others (confusion of the right installation directory):bash: …: No such file or directory
I successfully brewed 5.10.1 and 5.12.1 on openSUSE-11.2, but on OS X Snow Leopard I only brewed 5.12.1 successfully, brewing 5.10.1 failed.
To be continued …
Update 2011-10-16:
On my Mac running Lion I was able to perlbrew these releases of perl- perl-5.15.3 and
- perl-5.14.2
- but not perl-5.12.4, 5.10.1, 5.8.9, 5.6.2
but that seems more than sufficient to me.Looks like OS X got targeted as a serious platform for perl development only rather recently.
…
Update 2012-10-07: A historic note: I first looked into perlbrew in the context of “biz-JG”. -
ruby, gsub, and backslash characters within the replacement
My ruby problem of the day: I have e-mail addresses, and I want to use them within procmail rules. Therefore certain characters like the dot character and also the “+” need escaping.
It took me an endless while, like certain things always take an endless while on unknown grounds.
I started with single quotes just as in the gsub examples in the pickaxe3 book.
I didn’t get the right number of backslashs in place within the replacement string, as long as the replacement string used single quotes.
Finally a Google search for “ruby gsub replacement backslash” led me to a solution. Not to an overly serious one, to be honest.
The example there used double quotes, so I replaced my single quotes with double quotes, and I started again increasing the number of accumulated backslash characters. That way I achieved within a pretty short time, what I needed to achieve. Not that I had learned too much.
-
Ruby User Group Berlin / 2010-07-01 “meetup” / a brief report
- Jan Berkel talked to us about Ruby on Google App Engine
(link added at 2010-07-02-14-42),
- and Benjamin Krause talked to us about Unobtrusive Google Analytics Event Tracking.
Of course both presentations were given with quite some compentence and professionality, but the Google App thing excited me personally far more.
Here are
I am rather keen to see Jan‘s slides and his code getting announced on the Google Group.
Well, ruby apps run in a Google App environment through jruby, which in turn runs on a JVM. Jan told us of two different working approaches. Rails does run in theory in that environment, but it takes way too long to start. Instead Sintra seems to be the ruby framework of choice wrt the Google App Engine.I might err there …, sorry, rephrase:
maybe that question is heretic, but simply put: what’s the status of perl on the Google App Engine?
Looks like nothing moved after 2009-07-01 with perl-appengine, right?
I personally would love to see a perl app say “hello world!” on the Google App Engine.RUG-B’s mailing list lives on Google Groups.
- Jan Berkel talked to us about Ruby on Google App Engine
-
some *-berlin.de domains
All of a sudden today I thought I should register a couple of domains.
Here they are:Quite a good start — even e-mail addresses are set up!
If you want to have any such e-mail address — talk to me! -
Spidering Hacks – O’Reilly Media
CHAPTER ONE
Hack #2 – Best Practices for You and Your Spider
…
Be Liberal in What You Accept
… This is an inexact science, to put it mildly. …
…
Monitor your spider’s output on a regular basis to make sure it’s working as expected [Hack #31], make the appropriate adjustments as soon as possible to avoid losing ground with your data gathering, and design your spider to be as adaptive to site redesigns [Hack #32] as possible.
…
Don’t Reinvent the Wheel- …
- Best Practices for You
If you must scrape HTML, do so sparingly. If the information you want is avail- able only embedded in an HTML page, try to find a “Text Only” or “Print this Page” variant; these usually have far less complicated HTML and a higher content-to-presentation markup quotient, and they don’t tend to change all that much (by comparison) during site redesigns.
Hack #4 – Registering Your Spider
By the way, you might think that your spider is minimal or low-key enough that nobody’s going to notice it. That’s probably not the case. In fact, sites like Webmaster World (http://www.webmasterworld.com) have entire forums devoted to identifying and discussing spiders. Don’t think that your spider is going to get ignored just because you’re not using a thousand online servers and spidering millions of pages a day.
Naming Your Spider
… There are web sites, like http://www.iplists.com, devoted to tracking IP addresses of legitimate spiders. …
Hack #5 – Preempting Discovery
No matter how gentle and polite your spider is, sooner or later you’re going to be noticed. Some webmaster’s going to see what your spider is up to, and they’re going to want some answers.
…
Hack #6 – Keeping Your Spider Out of Sticky Situations Hack
Bad Spider, No Biscuit!
… There is nothing stopping a disgruntled site from revising its TOS to deny a spider’s access, and then sending you a “cease and desist” letter. … Spidering another site’s content and reappropriating it into your own framed pages is bad. Don’t do it. …
Competitive IntelligenceSome sites complain because their competitors access and spider their data—data that’s publicly available to any browser—and use it in their com- petitive activities. You might agree with them and you might not, but the fact is that such scraping has been the object of legal action in the past. Bid- der’s Edge was sued by eBay (http://pub.bna.com/lw/21200.htm) for such a spider. …
Possible Consequences of Misbehaving Spiders
… But considering lawyer’s fees, the time it’ll take out of your life, and the monetary penalties that might be imposed on you, a lawsuit is bad enough, and it’s a good enough reason to make sure that your spiders are behaving and your intent is fair. …
CHAPTER TWO
Assembling a Toolbox
Hacks #8–32
…
Chapter 4 Gleaning Data from Databases
…
Hack #69 – Aggregating RSS and Posting Changes
-> meta feeds, aggregating feeds, …