March 2010 Archives

dh-make-perl --locate Foo::Bar

| No Comments

I didn't know about this easy way to locate Perl modules in Debian packages.

$ dh-make-perl --locate Foo::Bar
Using cached Contents from Fri Mar 26 10:25:51 2010
Foo::Bar is not found in any Debian package

$ dh-make-perl --locate Moose::Meta::Class
Using cached Contents from Fri Mar 26 10:25:51 2010
Moose::Meta::Class is in libmoose-perl package

$ dh-make-perl --locate Test::More
Using cached Contents from Fri Mar 26 10:25:51 2010
Test::More is in Perl core (package perl) since 5.6.2

So there is a ready made solution how to locate Perl modules in Debian packages. The '--locate' option is in Squeeze (testing) version of dh-make-perl or in the source repositiory.

twitter?

| No Comments

So I've decided to give the twitter a try.

(huh, that was short. I'm probably getting adapted to 140chars...)

nix für mono-people

| No Comments

Why not? Because the world is not black and white and because we don't speak only one language. And because it is fun.

Since a while I was thinking about a way how to support pages written in my mother language - Slovak. As I'm an IT, 95% of information that I need to read and lookup is written in English. Now my concern was what if anyone writes a really good article in Slovak I'll most likely never find out through the search.

Now I've put things to a test on search.meonl.com. How it works? The search terms are written in one language (English for the moment) and in each column, besides a search engine type, a language can be chosen, and whenever the search term is submitted it is automatically translated, using google translate, to the other language(s). While Google Translate will be never perfect, for basic translation of search keywords works quite fine. In worst case user can rephrase and resubmit.

Only the usage can tell if it will be useful or not as not everyone has a wide screen and not every one can cope with stereo information. Me too likes the clean and plain look of Google search engine, but...

A simple showcases:

For now there is only one localization and that is Slovak, but if I mange to find someone willing to translate the about page and few tooltip keywords there can be also any other (Google Translate supported) language as a primary search language.

Have fun!

eq_deeply with Data::Dumper

| No Comments

From http://dev.catalystframework.org/svnweb/bast/revision?rev=8823

use Test::Deep qw(eq_deeply);
...
return eq_deeply($bind_ref1, $bind_ref2);

vs

use Data::Dumper;
...
local $Data::Dumper::Useqq = 1;
local $Data::Dumper::Sortkeys = 1;
return Dumper($bind_ref1) eq Dumper($bind_ref2);

# print out all dependencies of an unpacked distribution that are packaged for Debian
perl -MDebian::Apt::PM -MModule::Depends -le \
   '$apm=Debian::Apt::PM->new();$md=Module::Depends->new->dist_dir(".")->find_modules; %r=(%{$md->requires},%{$md->build_requires}); while (($m, $v) = each %r) { $f=$apm->find($m, $v); print $f->{"min"}->{"package"} if $f->{"min"} }' \
   | sort \
   | uniq \
   | xargs echo apt-get install

# print out all dependencies of an unpacked distribution that are not packaged for Debian
perl -MDebian::Apt::PM -MModule::Depends -le \
   '$apm=Debian::Apt::PM->new();$md=Module::Depends->new->dist_dir(".")->find_modules; %r=(%{$md->requires},%{$md->build_requires}); while (($m, $v) = each %r) { $f=$apm->find($m, $v); print $m, " ", $v if not $f->{"min"} }'

Updates

Subscribe to the blog updates with an email:

If you like it, share it.

Pages

About this Archive

This page is an archive of entries from March 2010 listed from newest to oldest.

February 2010 is the previous archive.

April 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.