/blogs.perl.org-entries/blogs.perl.org-journal.xhtml
XHTML | 3501 lines | 2984 code | 517 blank | 0 comment | 0 complexity | 3cc8fd43a43df0870749259985675e4a MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?xml version="1.0" encoding="utf-8"?>
- <!-- vim: set indentexpr=: -->
- <!DOCTYPE
- html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
- <head>
- <title>blogs.perl.org Blog</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <style type="text/css">
- div.entry
- {
- border: darkgreen solid medium;
- padding: 0.5em;
- margin: 0.5em;
- }
- </style>
- </head>
- <body>
- <div class="entry" id="text-table-1">
- <ul class="info">
- <li><b>Date:</b> 21-04-2011</li>
- </ul>
- <h1>Introduction to blogs.perl.org + Text::Table</h1>
- <p>
- Hello, Perl bloggers! I decided to start
- blogging about a most of my exclusively Perl-related stuff here on
- blogs.perl.org, in hope of getting more comments
- from active Perlers. (Until now, I've blogged about it
- <a href="http://shlomif-tech.livejournal.com/">on
- my technical LiveJournal blog</a> and previously on
- <a href="http://use.perl.org/~Shlomi+Fish/journal/">use.perl.org Journal</a>.).
- You can learn more about me on <a href="http://www.shlomifish.org/">my home
- site - www.shlomifish.org</a> .
- </p>
- <p>
- OK, having put that aside - let's move on to the main topic of this post.
- </p>
- <hr />
- <p>
- Many months ago I wanted to use the
- <a href="http://search.cpan.org/dist/Text-Table/">Text::Table CPAN module</a>
- to present a table related to the meta-scan heuristics construction
- scheme of <a href="http://fc-solve.berlios.de/">Freecell Solver</a>. Now,
- I wanted to present nicely formatted borders, using the
- <a href="http://en.wikipedia.org/wiki/Box-drawing_characters">Unicode
- box-drawing characters</a> (which some people would recall from DOS).
- However, I found it difficult to specify the separators in the
- rulers properly based on their indices - they were assumed to be the
- same globally. As a result, I've written
- <a href="https://rt.cpan.org/Public/Bug/Display.html?id=61610">a patch</a>,
- and placed the modifications in
- <a href="http://github.com/shlomif/Text-Table">a github repository</a>.
- </p>
- <p>
- The author of Text-Table (ANNO) told me he was working on a new version
- of Text-Table, which will contain many improvements. However, I was still
- interested in an enhanced version of the old Text-Table codebase with my
- patch, and after talking on <a href="irc://irc.freenode.net/#perl">#perl</a>,
- ANNO said I could have co-maint
- on Text-Table-1.x and continue to improve it. The new Text-Table will be
- released under a separate namespace - <tt>Text::Table2</tt> or so.
- </p>
- <p>
- Many thanks go to ANNO for agreeing that I further develop Text::Table.
- </p>
- <p>
- Using my git repository, I did many cleanups, like add
- pod.t and pod-coverage.t, tweak the author information, add more strict and
- warnings to the file, etc. ANNO 's original licence is
- <a href="http://perlbuzz.com/2009/07/help-end-licensing-under-same-terms-as-perl-itself.html">"Same
- terms as Perl"</a>, but since it is an iffy licensing, I decided that all
- further changes will be under the terms of the Public-Domain/X11L/etc.. People
- who send me pull requests on github may wish to add their names to the credits
- (in the changes or even in the core module) but must not claim copyrights to
- their changes.
- </p>
- <p>
- OK, now for some output of the Unicode table:
- </p>
- <pre>
- ┌───────╥─────┬──────┬─────┬────┬──────┐
- │ Place ║ 1 │ 2 │ 3 │ 4 │ 5 │
- ├───────╫─────┼──────┼─────┼────┼──────┤
- │ 1 ║ 68 │ 317 │ 15 │ 3 │ 381 │
- ├───────╫─────┼──────┼─────┼────┼──────┤
- │ 2 ║ 171 │ 482 │ 31 │ 14 │ 594 │
- ├───────╫─────┼──────┼─────┼────┼──────┤
- │ 3 ║ 275 │ 867 │ 42 │ 22 │ 1007 │
- ├───────╫─────┼──────┼─────┼────┼──────┤
- │ 4 ║ 458 │ 1442 │ 125 │ 30 │ 1630 │
- ├───────╫─────┼──────┼─────┼────┼──────┤
- │ 5 ║ 640 │ 1715 │ 137 │ 47 │ 1730 │
- └───────╨─────┴──────┴─────┴────┴──────┘
- </pre>
- <p>
- Future plans are:
- </p>
- <ol>
- <li>
- Convert the remaining test scripts to Test::More.
- </li>
- <li>
- Go over the code and clean it up
- </li>
- <li>
- Add CPAN keywords to the <tt>META.yml</tt>. (Perhaps this will require
- defining a Module-Build-based Build.PL file).
- </li>
- <li>
- Add URLs to the <tt>META.ym</tt>l - to the module's homepage, to the github repository,
- etc..
- </li>
- <li>
- Possibly implement some future features.
- </li>
- <li>
- Add some more tests.
- </li>
- </ol>
- <p>
- Contributions are naturally welcome, just fork the github repository and send
- me a pull request. (Or patches are also OK.)
- </p>
- </div>
- <div class="entry" id="entry-to-yapc-europe-2011">
- <ul class="info">
- <li><b>Date:</b> 20-06-2011</li>
- <li class="tags">YAPC</li>
- </ul>
- <h1>Transferring a Ticket to YAPC::Europe::2011</h1>
- <p>
- I originally planned to attend
- <a href="http://yapceurope.lv/ye2011/">YAPC::Europe::2011</a> in Riga, Latvia
- (on 15-17 August, 2011), and so bought an early bird ticket, but will no
- longer be able to attend due to personal reasons. As a result, I'm now seaking
- to transfer the ticket to someone else, for the right price (which will be
- cheaper than what I bought it.).
- </p>
- <p>
- If you are interested, please
- <a href="http://www.shlomifish.org/me/contact-me/">contact me</a> and we will
- negotiate a price. I hope everybody enjoys the YAPCs.
- </p>
- </div>
- <div class="entry" id="resuming-maintenance-of-xml-libxml">
- <ul class="info">
- <li><b>Date:</b> 20-06-2011</li>
- <li class="tags">XML, libxml, CPAN</li>
- </ul>
- <h1>Resuming Maintenance of XML-LibXML</h1>
- <p>
- For a long while, work on the
- <a href="http://beta.metacpan.org/release/XML-LibXML">XML-LibXML
- CPAN module</a> halted as the existing maintainer was busy.
- After <a href="http://code.activestate.com/lists/perl-xml/8885/">a
- discussion</a> on the Perl-in-XML mailing list, some people and I were
- given co-maintainer status and we resumed its maintenance inside
- <a href="https://bitbucket.org/shlomif/perl-xml-libxml">a Bitbucket.org
- Mercurial repository</a>.
- </p>
- <p>
- So far what I did, was fix some low-hanging fruit
- bugs, apply some patches, as well as start the long process of converting
- the test suite, which still uses Test.pm to
- <a href="http://beta.metacpan.org/module/Test::More">Test::More</a> . There are
- still many bugs lurking there, and some of them are XS bugs that are still
- beyond my reach, and I could use some assistance there. But it's a start.
- </p>
- <p>
- If you're interested in helping, the clone the repository, write a patch and
- send me a pull request.
- </p>
- <p>
- <b>Text::Table Update:</b> I've written about
- <a href="http://blogs.perl.org/users/shlomi_fish/2011/04/introduction-to-blogsperlorg-texttable.html">resuming
- the maintenance of Text::Table</a> in April, and it progressed nicely:
- the tests were converted to Test::More, a lot of the code was cleaned up,
- the build system was converted to Module::Build, and keywords and resource
- URLs were defined, and some bugs were solved (along with tests). I'm still
- looking into ways to clean up the code, and if anyone has an idea for a cool
- feature, then they should drop me a line (or provide a patch).
- </p>
- </div>
- <div class="entry" id="convert-away-from-Test.pm">
- <ul class="info">
- <li><b>Date:</b> 23-06-2011</li>
- <li class="tags">QA, PPI, Perl</li>
- </ul>
- <h1>PPI-Based Script to Convert Test.pm-based Test Programs to Test::More</h1>
- <p>
- Some CPAN modules I inherited used the old
- <a href="http://search.cpan.org/perldoc?Test">Test.pm</a> for some of their
- <tt>t/*.t</tt> scripts instead of the more modern
- <a href="http://en.wikipedia.org/wiki/Test::More">Test::More</a>. This
- annoys me to no end because Test.pm is very limited. When I worked on
- <a href="http://beta.metacpan.org/release/Config-IniFiles">Config-IniFiles</a>,
- I did the conversion manually, which was a lot of work. More recently, I
- <a href="http://blogs.perl.org/users/shlomi_fish/2011/06/resuming-maintenance-of-xml-libxml.html">started
- working on XML-LibXML</a> which has over 40 of those pesky Test.pm scripts, and
- I did not have the nerve to do all the manual and menial work.
- </p>
- <p>
- As a result, I ended up spending a few hours studying
- <a href="http://beta.metacpan.org/release/PPI">PPI</a> (the Perl Parsing
- Interface), and writing
- <a href="http://www.shlomifish.org/open-source/projects/Test.pm-Converter/">a
- script</a> to automatically convert Test.pm-based scripts to Test::More. The
- main issue at hand was that in Test.pm, a single argument <tt>ok()</tt>
- tests for the scalar's truth, while a double argument <tt>ok()</tt> tests for
- simple equivalence (similarly to Test::More's <tt>is()</tt>). Eventually, I got
- the script working, with some limitations (see <a
- href="http://www.shlomifish.org/open-source/projects/Test.pm-Converter/">the page</a>).
- </p>
- <p>
- So what was my impression of PPI? It naturally seems more robust than using
- regular expressions and hacks to process Perl code, but there were a few quirks.
- For example, a PPI
- <a href="http://beta.metacpan.org/module/PPI::Structure::List">list</a> contains
- an array of its contents, and the commas are part of them, as are the
- various other tokens in the sub-expressions. Therefore, divining the count of
- the arguments is pretty hard. I would have expected to get a more <a href="http://en.wikipedia.org/wiki/Abstract_syntax_tree">abstract
- syntax tree</a> of the arguments, and since I didn't I had to work around
- it with an ugly kludge.
- </p>
- <p>
- Furthermore, after stringifying the document object, the contents of the
- <a href="http://en.wikipedia.org/wiki/Here_document">here-documents</a> were
- not included in the output from some reason. However, I may have done something
- wrong. I also wish the PPI PODs contained more meaningful examples.
- </p>
- <p>
- Nevertheless, my script is mostly working now and I can utilise it to
- "test-lift" legacy test programs. You might find it useful too, so it's there
- in case you need it, and patches to fix its limitations would be welcome.
- </p>
- </div>
- <div class="entry" id="Inline-C">
- <ul class="info">
- <li><b>Date:</b> 09-11-2011</li>
- <li class="tags">Perl, QA, XS, Inline, C, ctypes, gcc</li>
- </ul>
- <h1>My Experience with Inline::C</h1>
- <p>
- I know I didn’t write here for a long time, and I apologise for it, but I have
- this entry and another one in mind and I hope they can compensate for it.
- </p>
- <p>
- For my work on <a href="http://fc-solve.shlomifish.org/">Freecell Solver</a>,
- I’ve written some code for encoding and decoding game positions into a
- compact format, by encoding them as a delta from the position of origin. I
- first wrote it in Perl, in order to prototype it, and later
- translated it to C (which is the language that Freecell Solver is written in).
- I have written some rudimentary unit tests for it, but also wanted to test the
- code against a large number of positions, by runnign it over the solutions of
- many Freecell deals.
- </p>
- <p>
- The encoding rearranges the order of the card columns and the freecells, so
- testing that the output test is correct requires calculating that arrangement.
- This was also done by the Perl code. I decided to write a small wrapper for
- an encoding+decoding round-trip in C, and use it from a Perl program I was
- writing. So far so good.
- </p>
- <p>
- I first looked at <a href="https://gitorious.org/perl-ctypes">the
- Perl version of Ctypes</a>, but it failed a large number of its assertions
- on my system, so I could not really trust it. Then I looked at
- <a href="http://search.cpan.org/perldoc?Inline::C">Inline::C</a>. I could
- not understand from its main page, how to return an <tt>SV *</tt> containing
- a string from it, but this was covered in the extensive
- <a href="http://search.cpan.org/perldoc?Inline::C-Cookbook">Inline::C
- cookbook</a> and I wrote this Inline::C function:
- </p>
- <pre>
- extern char * fc_solve_user_INTERNAL_delta_states_enc_and_dec(
- const char * init_state_str_proto,
- const char * derived_state_str_proto
- );
- SV* enc_and_dec(char * init_state_s, char * derived_state_s) {
- SV * ret;
- char * s;
- s = fc_solve_user_INTERNAL_delta_states_enc_and_dec(init_state_s, derived_state_s);
- ret = newSVpv(s, 0);
- free(s);
- return ret;
- }
- </pre>
- <p>
- I don't need to use “sv_2mortal” there because Inline::C does that for us.
- Then I tried to test it. It failed with this error:
- </p>
- <pre>
- perl: symbol lookup error: /home/shlomif/progs/freecell/trunk/fc-solve/source/_Inline/lib/auto/Mega_Test_for_C_delta_states_pl_9385/Mega_Test_for_C_delta_states_pl_9385.so: undefined symbol: fc_solve_user_INTERNAL_delta_states_enc_and_dec
- </pre>
- <p>
- I was familiar with errors like that, but it took me over an hour of playing
- with the various Inline::C configuration options, and trying to figure out
- why it didn’t link against the relevant Freecell Solver library to realise
- what the problem was. It was that the library in question did not export the
- symbol, and gcc realised it didn't give the XS extension anything and omitted
- it.
- </p>
- <p>
- After fixing this line in my C source:
- </p>
- <pre>
- char * DLLEXPORT fc_solve_user_INTERNAL_delta_states_enc_and_dec(
- </pre>
- <p>
- To this line:
- </p>
- <pre>
- DLLEXPORT char * fc_solve_user_INTERNAL_delta_states_enc_and_dec(
- </pre>
- <p>
- Everything worked properly, and I was able to run the so-called “mega-test”.
- </p>
- <p>
- If you’re having similar problems with Inline::C, you should try to add
- <tt>CLEAN_AFTER_BUILD => 0</tt> to its configuration. It ended up clarifying
- a lot for me.
- </p>
- <p>
- Cheers!
- </p>
- </div>
- <div class="entry" id="exec-portability">
- <ul class="info">
- <li><b>Date:</b> 09-11-2011</li>
- <li class="tags">exec, perl, portability, whitespace, windows, unix</li>
- </ul>
- <h1>exec's portability</h1>
- <p>
- Pop quiz! What does this perl 5 program prints when executed with no
- arguments?
- </p>
- <pre>
- #!/usr/bin/perl
- use strict;
- use warnings;
- if (! @ARGV)
- {
- exec($^X, $0, "hello world");
- }
- else
- {
- my $arg = shift(@ARGV);
- print "Got <$arg>\n";
- if (@ARGV)
- {
- print "Other args are <@ARGV>\n";
- }
- }
- </pre>
- <p>
- The answer is “it depends.”. On my Linux system it prints
- “Got <hello world>”, while on Windows, using Strawberry Perl, it
- prints “Got <hello>” and later on that the other args are “world”.
- </p>
- <p>
- I would expect the Linux behaviour were every argument passed to the list
- <a href="http://perldoc.perl.org/functions/exec.html">exec</a> arrives as
- one argument to <tt>@ARGV</tt> regardless of whitespace as the correct. It
- also the behaviour exhibited on both operating systems using
- <a href="http://perldoc.perl.org/functions/system.html">system</a>. Is this
- a bug?
- </p>
- <p>
- <a href="http://perldoc.perl.org/perlport.html">perlport</a> only has this
- to say about whitespace: <q>Whitespace in filenames is tolerated on most
- systems, but not all, and even on systems where it might be tolerated, some
- utilities might become confused by such whitespace.</q>.
- </p>
- <p>
- I discovered this strange mis-behaviour when working on a commission for
- a client who is Windows-based.
- </p>
- </div>
- <div class="entry" id="telaviv_pm_2011_Nov_report">
- <ul class="info">
- <li><b>Date:</b> 03-12-2011</li>
- <li class="tags">Perl, Mongers, Tel Aviv, Israel, meeting, DBI, DBIx-Class, local-lib, perlbrew, cpanminus, CPAN, Firebird, SQL</li>
- </ul>
- <h1>Report on the Latest Tel Aviv Perl Mongers Meeting</h1>
- <p>
- I attended the latest
- <a href="http://telaviv.pm.org/">Tel Aviv Perl Mongers (TelAviv.pm)</a>
- meeting the other
- day, and am writing this report in order to encourage more people
- to come. We didn't have meetings in September or October due to the Jewish
- holidays and some renovations on the site, so it was good to finally have
- a meeting.
- </p>
- <p>
- Before the meeting, I had helped publicise it on various online news channels,
- and thankfully quite a few people (about 20-30) came. I had a previous
- appointment that day at 12:00, and so returned home where I ate, worked on
- the computer, and rested before the TelAviv.pm meeting.
- </p>
- <p>
- After I rode the bus, I arrived there a few minutes earlier. I met a fellow
- Perl monger on the way. We found the room with some difficulty, as there were
- very few signs outside the doors of the various rooms in the building. Several
- people
- including <a href="http://szabgab.com/">Gabor</a> were already sitting
- in the room.
- They were discussing the upcoming Israeli Perl Workshop in February. In any
- case, I decided to walk to the nearby
- grocery store to buy some refreshments for the meeting, and when I returned
- there were more people in the room.
- </p>
- <p>
- Quite a few people arrived relatively late, but the talks started mostly on
- schedule. The first talk (by Erez Schatz) was short, and it discussed some
- recent tools that
- facilitate the Perl programmer’s life: <a href="http://search.cpan.org/dist/local-lib/">local-lib</a>, <a href="http://www.perlbrew.pl/">perlbrew</a>, cpanm
- and pm-uninstall. The talk was very fun, and he ended up covering some other
- tools in brief in the last slide. I’m still not convinced that I should use
- CPAN-Minus instead of my CPANPLUS (especially given
- <a href="http://search.cpan.org/dist/CPANPLUS-Dist-Mageia/">CPANPLUS-Dist-Mageia</a>
- and friends), but I still like perlbrew and local::lib and pm-uninstall seems
- useful.
- </p>
- <p>
- Erez mentioned that on Perl forums there were several very common and hated
- questions like “How do I uninstall a perl module?” or “How can I use
- CPAN without root?” and that these technologies address these needs precisely.
- </p>
- <p>
- After this talk, Erez gave a longer talk about DBIx-Class, which is an
- Object-Relational Mapper (ORM) for Perl. For the demo, he used a company
- whose employees are dogs, and the slides featured many pictures of dogs in
- suits (some of them pretty scary). There were a few glitches in the
- demonstration, but they
- were promptly overcome, and the <tt>DBIC_TRACE=1</tt> flag was a big help.
- One bug in the code was that instead of updating the employee's department
- (by looking it up by name), the department's name was updated (globally). I
- any case, it was an enjoyable talk, but the person who sat next to me said
- that she didn’t like it because she used to be a DBA, and she was worried about
- performance.
- </p>
- <p>
- Erez mentioned that DBIx-Class was the “Elephant in the Room” of Perl ORMs,
- which I had concluded was the case as well.
- </p>
- <p>
- After that talk, there was a break, where people got to eat more of the
- cookies I bought and to chat. Afterwards, Ido Kanner presented about
- <a href="http://www.firebirdsql.org/">Firebird SQL</a>. It was a good talk,
- and Ido drew some comparisons between Firebird and SQLite, MySQL and
- PostgreSQL. Firebird looks interesting and it also has embedded (like
- SQLite) and read-only modes.
- </p>
- <p>
- One problem during the talk was that the projector kept shutting down,
- and it took us some trouble to restart it. We hoped this problem would be
- resolved in upcoming meetings.
- </p>
- <p>
- After the meeting, some of us (about 10) went to Spaghettim (a pasta/etc.
- place) and had dinner. We chatted about Atheism, Cable company tech-support,
- GNOME 3 and KDE 4, and lots of other stuff. This time I had a pizza, which
- although not too bad, made me realise I will be ordering pasta there from now
- on.
- </p>
- <p>
- To sum up, it was a very enjoyable meeting, and I’m looking forward for
- more future ones. One thing notable about it is that this time Sawyer did not
- deliver a talk, which made him happy because other people volunteered to do
- so instead.
- </p>
- </div>
- <div class="entry" id="breaking_the_perl_debugger_for_fun_and_profit">
- <ul class="info">
- <li><b>Date:</b> 26-12-2011</li>
- <li class="tags">perl,debugger,debugging,refactoring,features,sopa,telaviv,mongers</li>
- </ul>
- <h1>Breaking the Perl Debugger for Fun and Profit</h1>
- <p>
- Before I cover the main topic of this entry, here are some short news and
- action items:
- </p>
- <ol>
- <li>
- <p>
- If you have not acted against
- <a href="https://www.eff.org/deeplinks/2011/12/fight-blacklist-toolkit-anti-sopa-activists">SOPA
- - the proposed online blacklist/censorship bill</a>, you should. Follow the
- link for information on how to act against it.
- </p>
- </li>
- <li>
- <p>
- I have announced the
- <a href="http://shlomif-tech.livejournal.com/60825.html">next Tel Aviv
- Perl Mongers meeting</a> on my technical journal on LiveJournal.com. It will
- take place this Wednesday, on 28 December, 2011. More information in the link.
- </p>
- </li>
- <li>
- <p>
- <a href="http://golf.shinh.org/">Anarchy Golf</a> is a new server for Code Golf,
- which are online programming competitions for implementing code as shortly as
- possible. It supports Perl 5, Perl 6 and many other languages. There is
- <a href="http://golf.shinh.org/p.rb?Starburst">an active challenge</a>, where
- the only Perl 5 submission so far is mine, so I could use some competition.
- </p>
- </li>
- </ol>
- <p>
- Now for the main topic of the post. Recently, three patches were integrated
- into the perl-5 core implementing new features in the perl debugger:
- </p>
- <ol>
- <li>
- <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2011/04/msg171038.html">Add "b <filename>:<line> <cond>" to perl -d</a> by me.
- </li>
- <li>
- <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2011/08/msg176454.html">Add enable/disable commands for breakpoints in perl -d</a> also by me.
- </li>
- <li>
- <a href="https://rt.perl.org/rt3/Public/Bug/Display.html?id=104168">"Trace to max depth"</a> by Peter Scott.
- </li>
- </ol>
- <p>
- When Father Chrysostomos tried to apply the first patch, he noticed its tests
- started failing. Apparently, the breakpoint functionality (irrespective of
- the patch's added functionality) became broken in bleadperl, due to a change
- in the internals, and it wasn't caught by the debugger's existing tests. I
- ended up submitting another patch to add a test for some of the existing
- breakpoint functionality.
- </p>
- <p>
- The other two patches passed all of their own tests and the existing ones, but
- that wasn't the end of the story. A short time afterwards
- <a href="https://rt.perl.org/rt3/Public/Bug/Display.html?id=104820">a
- regression was reported in the debugger</a>, which was caused by one of the
- patches that I introduced. While, I fixed it with a test, it was soon followed
- by other reports and fixes. None of these bugs were caught by the test suite
- of the perl debugger, which is incredibly incomplete.
- </p>
- <p>
- Another E-mail that caused an active discussion was
- <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2011/11/msg179847.html">my
- proposal to add strict and warnings to lib/perl5db.pl</a>, in which someone
- kept arguing against it, and eventually said he confused it (it being the
- defualt command-line debugger front-end) with the debugger's guts, and ended
- up also supporting adding "use strict;".
- </p>
- <p>
- I ended up working on adding "strict" to the debugger on a git branch, and
- was eventually successful (though I temporarily broken no-strict code on the
- debugger evaluated lines, to which I added a test.). RJBS (the current
- pumpking) said he'd like to integrate this patch only after perl-5.16.x
- is released.
- </p>
- <p>
- The morals of this story is that the perl debugger needs more tests, and
- that trying to enhance it can easily break it. I started
- <a href="https://github.com/shlomif/perl/tree/perl-d-add-tests-3">a branch
- on GitHub</a> where I've been committing more tests to the perl debugger
- to enhance its coverage.
- </p>
- <p>
- There's also a Google Code-In task for devising a strategy to do that, and
- I've volunteered to mentor it. All this will hopefully result in less breakage
- in the future.
- </p>
- <p>
- Happy Holidays, and a Happy New Year.
- </p>
- </div>
- <div class="entry" id="report_on_israeli_perl_workshop_2012">
- <ul class="info">
- <li><b>Date:</b> 27-03-2012</li>
- <li class="tags">perl, workshop, israel, events, 2012</li>
- </ul>
- <h1>Report on the Israeli Perl Workshop 2012</h1>
- <p>
- Well, I've got a lot of stuff I’d like to blog about in the various blogs of
- mine, and so I’m starting with this report on the
- <a href="http://act.perl.org.il/ilpw2012/">Israeli Perl Workshop of 2012</a>,
- which had taken place in 28 February, 2012. Moreover, April Fools' Day is
- approaching, and I had an idea for a Perl-related April Fools' gag, but after
- telling it to RJBS (the current Perl pumpking), he and I agreed that it would
- hit too many nerves. (PerlJam on IRC said he liked it, though). Maybe I’ll
- publish it on 2 April with a big disclaimer on top, just for kicks.
- </p>
- <p>
- Anyway, here is the report. I had originally posted it to the Perl in Israel
- mailing list for review, but did not get any reviews, so it may not be too
- letter-perfect, but I guess that’s life.
- </p>
- <p>This is my report about the
- <a href="http://act.perl.org.il/ilpw2012/">Israeli Perl Workshop of 2012</a> . It was
- a fun and educational event, and I'm glad I was able to attend it. For better
- or for worse, all the talks I attended were in Room 1, but I was still able
- to hear the ends of a few talks in Room 2 (because the corresponding talks
- in Room 1 ended before them).</p>
- <p>I set up an alarm the night before in order to wake up early in time for the
- event, and ended up waking up some time before it (and even the alarm time was
- much earlier than what I was used to). Then I made some preparations, ate
- breakfast, and caught the appropriate bus. After I walked from the bus station
- to Shenkar, it took me some time to find the place, because it wasn't the
- same entrance as our normal rooms, and the signs were confusing. What I needed
- to do was to take the stairs down to the yard, and then go to the organisation
- room, but it was hard to find.</p>
- <p>There I got my name sticker, the schedule, and some swag from booking.com. I’d
- like to thank <a href="http://www.booking.com/">Booking.com</a> for sponsoring the Israeli
- Perl Workshop 2012 (as well as having a presence there and giving some swag
- and chocolates), and they are looking for software developers with Perl
- experience to relocate to Amsterdam, so please consider working for them.</p>
- <p>In the yard, I met a few people including
- <a href="http://search.cpan.org/~flora/">Florian Ragwitz</a> (a.k.a "FLORA" on CPAN or
- "rafl" on IRC - he has many cool modules there, including quite a few XS ones),
- who was one of the workshop’s visitors from Germany. Despite being German, his
- English accent sounded English to us. Later on we discussed accents in English
- and he noted that the accents of some Israelis he met sounded like French to
- him (while ours seemed less so). This is strange, because Israelis can
- distinguish between a French accent in English and an Israeli Hebrew accent in
- English. </p>
- <p>Anyway, Florian told me that he is planning on reviewing and pulling my
- Test::Aggregate GitHub pull request Real Soon Now™, a fact which has brought
- me some relief, because I've tried to contact him on IRC and ask him if he
- remembers.</p>
- <p>For better or for worse, all the talks that I preferred to hear took place in
- room #1 (while sometimes visiting Room #2) to hear the ends of talks. I still
- would be happy to hear many of the talks that took place in Room #2 in the
- normal Tel Aviv Perl Mongers meetings, or alternatively, those talks in room #1
- which lacked enough time to be conveyed satisfactorily.</p>
- <p>The first talk in the day was
- <a href="http://search.cpan.org/~eilara/">Ran Eilam</a>’s talk about "Syntactic Sugar
- causes Cancer of the Semicolon”, which had to be trimmed towards the end,
- because
- the introduction may have taken too long. The talk was interesting starting
- from an example of <code>ptr->val</code> being sugar in the C programming language
- for <code>(*ptr).val</code> and continuing to further examples. Ran raised the issue
- of whether syntactic sugar was important or not, which turns out to not be
- a straightforward question. He then demonstrated some modules for syntactic
- sugar on CPAN.</p>
- <p>I hope Ran can give a rerun of it on one of the mongers' meetings with more
- time allocated for that.</p>
- <p>After that I attended the talk of Stefan Hornburg (“racke”, known as
- <a href="http://search.cpan.org/~hornburg/">HORNBURG on CPAN</a>) who was another
- visitor from Germany, about
- <a href="http://act.perl.org.il/ilpw2012/talk/3955">Template::Flute</a> which is a
- designer’s friendly template system. In this template, one uses an HTML file
- with standard HTML attributes for designating the fields that needs to be
- replaced, and then an XML specification file that specifies how to process
- the HTML (and in addition one uses Perl to give it data). As a result the
- designers can manipulate the HTML with their own tools, while still
- allowing the programmers to populate it with data.</p>
- <p>This seems like an interesting and potentially useful tool, but it’s
- less expressive than template systems such as Template Toolkit. After the talk,
- another attendee whom we talked in private questioned the need for both the
- HTML file and the XML specification, but I didn't find a way to avoid it
- given the constraints that the HTML will be valid HTML 4/XHTML 1.</p>
- <p>The next talk about Time Management in Software Projects was cancelled because
- the presenter did not come (due to lack of time management as we joked then).
- I was able to catch a glimpse of the end of
- <a href="http://corky.net/dotan/">Dotan Dimet</a>’s “Perl and JavaScript:
- bioinformatics in a browser window” talk, but I don’t remember a lot of
- it except for a small amount of demonstration.</p>
- <p>The talk about Zero to CPAN was eventually given by
- <a href="http://blogs.perl.org/users/sawyer_x/">Sawyer</a> instead of by
- <a href="http://blogs.perl.org/users/erez_schatz/">Erez Schatz</a>. It was a nice one, and I’ve learned about
- <a href="http://metacpan.org/release/CPAN-Changes">the CPAN-Changes module</a> there
- (after Florian mentioned it, though). Sawyer covered the way to get to a
- working CPAN-like distribution from scratch using tools such as
- module-starter and explained what every file in the CPAN module hierarchy
- does, and demonstrated some test-driven-development. I knew most of it already,
- but it was still a fun talk.</p>
- <p><a href="http://www.linkedin.com/in/amirfr">Amir Friedman</a>‘s talk about software
- configuration management (SCM) came next,
- and he discussed some open-source solutions for the various parts of SCM,
- which include version control, release management, task management, and
- project management. He recommended Gitflow (which we had a talk about
- on the Tel Aviv mongers mailing list) for version control and release
- management, and a different solution called Jenkins for issue tracking (if
- I remember correctly). I then asked what he thought of integrated “all-in-one”
- solutions for SCM, and he said that those were pricey and he did not have
- any significant experience with them.</p>
- <p>The lunch break came next and I overheard a talk between two other people
- about teaching English to speakers of non-English languages. One of them
- said that he once worked with some Spanish Electrical Engineers and that they
- were “completely isolated” from the rest of the world because they didn’t
- read the literature in English. Then we discussed whether it was economical
- to teach English to hundreds of millions of speakers of Spanish, or whether
- we should expect most things to be translated. It was compared to the
- “give a man a fish” vs. “teach a man to fish”. We also discussed the fact that
- Dutchmen tended to have very good English, and one of the other people
- commented that it was true, but that they still tended to prefer using
- software with Dutch localisation.</p>
- <p>I’ve also talked with Sawyer about his upcoming
- <a href="http://act.perl.org.il/ilpw2012/talk/3936">“CGI.pm MUST DIE!” talk</a>. He
- said that he needs to become mentally energised for that talk because he
- feels strongly about it and wants to convey the energy. He passed an
- anecdote from a conference in Europe, in which he had given a talk about
- Dancer, and said he was so emotional then that people said “You must
- see him” and rushed to see his other talk. Moreover, afterwards, when asked
- who were the two best presenters in the conference, they said “[Someone
- very famous] and that Dancer guy”.</p>
- <p>The anti-CGI.pm presenting was indeed energetic and emotional, but kinda fell
- below my expectations due to the yard talk that preceded it. It was still
- pretty informative. Dotan Dimet later took the stage for the rebuttal
- of “CGI.pm - the only web development framework you’ll ever need” which was
- less emotional but still interesting. I was not convinced that CGI.pm’s
- HTML generation routines were a good way to do output HTML (I never really
- liked them), so I may have been more convinced by Sawyer.</p>
- <p><a href="http://www.ynonperek.com/">Ynon Perek</a>’s
- <a href="http://act.perl.org.il/ilpw2012/talk/3977">talk</a> about
- “Implementing Perl (Moose) Design Patterns” came next, which was interesting,
- but again lacked adequate time to cover everything, and I hope will be given
- with less time constraints. One anecdote from there was that Ynon said there
- where three primary ways for polymorphism in Perl: Inheritance (“is-a”),
- Roles/Traits (“does-a”) and Containment/Delegation (“has-a”) and that
- he could no longer recommend inheritance (but did not get to explain why not
- from what I recall).</p>
- <p>In any case, I was surprised at Ynon’s implementation of the Factory
- pattern, and don’t remember the implementation given by him.</p>
- <p>Next came Tamir Lousky’s
- <a href="http://act.perl.org.il/ilpw2012/talk/3953">talk</a> about generating vector
- graphics with Perl and SVG. Its slides contained a lot of very nice eye candy.
- The introduction
- to SVG and generating it was quite rudimentary, and did not cover the full
- potential of SVG. The demonstration and explanation of the module for
- generating random trees using SVG was interesting.</p>
- <p><a href="http://act.perl.org.il/ilpw2012/talk/3959">David Tabachnikov</a>’s next gave an
- interesting talk called “Scaling Up”. He
- contrasted optimisation (which makes your code run faster with the existing
- resources) to vertical scaling (= buying faster computers) to Horizontal
- scaling (= buying more hardware). He also noted that there’s some speed
- difference between the various SQL databases, but he did not encounter a
- situation where it would have made too much difference.</p>
- <p>The last feature of the evening were the lightning talks. I recall a talk
- by Florian Ragwitz about Google Code-In and Google Summer-of-Code. I also
- recall <a href="http://szabgab.com/">Gabor</a>’s talk about surviving in an uncooperative
- workplace. He said
- that if the workplace does not practise best practices such as using version
- control systems or writing automated tests, one can create their own
- small island of sanity where they make use of that on their own, and gradually
- convince the rest of the organisation that it’s beneficial.</p>
- <p>After the lightning talks, some people went to a local restaurant for dinner,
- but I decided against it because I was too tired from waking up early. As a
- result, I found someone who drove up north to drive me home, and got home.</p>
- <p>In the schedule I noticed that one could go to a certain URL at
- <a href="http://www.oreilly.com/">O’Reilly</a> and
- receive a free E-book of their choice. I used this opportunity to get the book
- <a href="http://shop.oreilly.com/product/9780596510046.do">Beautiful Code</a> , which
- I have started reading.</p>
- <p>The day was exhausting but very fun, and I enjoyed all the talks I attended.
- I’d like to thank the organisers of the event and most notably
- <a href="http://szabgab.com/">Gabor Szabo</a> and Sawyer X,
- <a href="http://www.shenkar.ac.il/">Shenkar college</a> for providing the venue,
- <a href="http://www.booking.com/">Booking.com</a> for the sponsorship, O’Reilly for
- the free book presents, the foreign guests who came to present and to attend,
- and all the other presenters, who volunteered to give talks.</p>
- <p>I hope we can repeat this the next year.
- </p>
- </div>
- <div class="entry" id="the_perl_april_fools_that_could_have_been">
- <ul class="info">
- <li><b>Date:</b> 09-04-2012</li>
- <li class="tags">perl, april fools, joke</li>
- </ul>
- <h1>The Perl April Fools' Gag That Could Have Been</h1>
- <p>
- On my <a href="http://blogs.perl.org/users/shlomi_fish/2012/03/report-on-the-israeli-perl-workshop-2012.html">last entry</a>,
- I told you that I have had an idea for a Perl-related April Fools’ day gag,
- and that I would possibly reveal it on 2-April with a big disclaimer
- on top, just for kicks. Well, it’s already 9-April, but I guess it is better
- late than never, right?
- </p>
- <p>
- OK, here is the big disclaimer: <b>THIS IS A JOKE. IT’S NOT SERIOUS. SO
- RELAX - IT IS NOT GOING TO HAPPEN SOON (AND HOPEFULLY WILL NOT EVER
- HAPPEN).</b>.
- </p>
- <p>
- OK, now let’s move on to the gag itself:
- </p>
- <blockquote>
- <p>
- 1 April 2012, Tel Aviv, Israel: the Perl foundation has announced today
- that by inspiration from Mozilla Firefox, the perl-porters (formerly known
- as perl5-porters) will adopt a schedule of a quarterly major release.
- </p>
- <p>
- “Since version 6 of Perl has been claimed by a malevolent project that
- amounted to very little, we will release Perl version 7 next Summer, followed
- by Perl 8 in next Fall, and Perl 9 next Winter.” said the designated Perl
- pumpking.The Perl foundation commented that it is sure that users will
- appreciate the accelerated release schedule, despite the fact that a lot
- of backwards’ compatibility will be broken in each release to further
- the language’s improvement.
- </p>
- <p>
- Some prominent Perl porters have added that they are looking into ways
- to automatically upgrade the Perl version automatically upon new
- releases, similar to the approach followed by the Google Chrome browser.
- “We are tired of people using outdated versions of Perl, which results in
- a maintenance burden for us, to say nothing of the security risk by bugs in
- old Perl versions. So we think the best way to mitigate that would be to
- simply force people to upgrade.”
- </p>
- <p>
- The Perl porters are hard at work on perl-7.0.0, which will implement the
- upcoming Perl 7 specification with many new and exciting features and
- incompatibilities.
- </p>
- </blockquote>
- <p>
- Well, like I said, after discussing this idea with
- <a href="http://rjbs.manxome.org/">RJBS</a> (the current Perl 5 Pumpking),
- he and I agreed that it would be too cruel, given that many people
- are sensitive about upgrading their versions of Perl 5. Comparisons of how
- old the perl that your workplace/client/etc. has deployed on their systems
- is a common source of discussion among perl mongers (and someone told me
- one of his clients still used perl 4), and many people would have found
- such an announcement alarming instead of funny. But I hope you enjoyed reading
- it, and hope you're also looking forward to perl-5.16.0, which should be out
- soon.
- </p>
- </div>
- <div class="entry" id="perl_begin_news_9_July_2002">
- <ul class="info">
- <li><b>Date:</b> 09-07-2012</li>
- <li class="tags">perl, begin, beginners, perl-begin, learn</li>
- </ul>
- <h1>What’s new on the Perl Beginners’s Site</h1>
- <p>
- The last update on the news feed for
- <a href="http://perl-begin.org/">The Perl Beginners’s site</a> was almost a
- year ago. While the site continued to improve, I neglected writing a new
- entry until now, so I hope this one will compensate for that.
- </p>
- <p>
- So without further ado, here is what is new:
- </p>
- <ol>
- <li>
- <p>
- We now have a page about <a href="http://perl-begin.org/humour/">Perl
- Humour</a>, which was restored from a page in the now offline perl.net.au
- wiki.
- </p>
- </li>
- <li>
- <p>
- Also originally from that wiki is the <a
- href="http://perl-begin.org/FAQs/freenode-perl/">Freenode’s #perl channel
- Frequently Asked Questions (FAQ) List</a>, which is well worth a read.
- </p>
- </li>
- <li>
- <p>
- Another restored page is
- <a href="http://perl-begin.org/topics/cpan/wrappers-for-distributions/">the
- list of CPAN Wrappers for Distributions</a>.
- </p>
- </li>
- <li>
- <p>
- We added <a href="http://perl-begin.org/uses/web-automation/">a page</a>
- about web automation in Perl, and <a
- href="http://perl-begin.org/topics/files-and-directories/">one about
- manipulating files and directories</a>.
- </p>
- </li>
- <li>
- <p>
- The
- <a href="http://perl-begin.org/platforms/windows/">Perl on Windows page</a>
- was enhanced with new links to Strawberry Perl and DWIM Perl.
- </p>
- </li>
- <li>
- <p>
- We have a new page about
- <a href="http://perl-begin.org/training/">Perl Training Providers</a>, which
- currently only contains a link to <a href="http://perltraining.org/">the Perl
- Training Directory</a>.
- </p>
- </li>
- <li>
- <p>
- <a href="http://perl-begin.org/tutorials/bad-elements/">The “Perl
- Elements to Avoid” page</a> contains many new entries.
- </p>
- </li>
- <li>
- <p>
- <a href="http://perl-begin.org/tutorials/modern-perl/">Our mirror of
- the book <i>Modern Perl</i> by chromatic</a> was updated to its latest
- edition.
- </p>
- </li>
- </ol>
- <p>
- We hope you find these additions useful or enlightening.
- </p>
- </div>
- <div class="entry" id="App_Notifier_cpan_distributions">
- <ul class="info">
- <li><b>Date:</b> 22-07-2012</li>
- <li class="tags">perl, cpan, dancer</li>
- </ul>
- <h1>Announcement: the App-Notifier CPAN Distributions</h1>
- <p>
- I would like to announce two new CPAN distributions of mine:
- <a href="https://metacpan.org/release/App-Notifier-Service">App-Notifier-Service</a>
- and
- <a href="https://metacpan.org/release/App-Notifier-Client">App-Notifier-Client</a>.
- These are derived from a few simplistic scripts I've written in shell and
- Perl, to allow me to notify when a task has finished (e.g:
- <tt>make ; finish-client</tt>) or a certain time has elapsed (e.g:
- <tt>sleep 240 ; finish-client</tt>), and I decided to create something
- more serious as CPAN modules.
- </p>
- <p>
- App-Notifier-Service implements an HTTP service (using Dancer), which
- listens for requests, and once one arrives, implements a callback, which
- notifies the user on the localhost that the event occured. App-Notifier-Client
- complements it by implementing a client that connects to the service
- and sends the event.
- </p>
- <p>
- Currently documentation may be lacking, and there are almost no automated
- tests in the distributions, but it appears to work nicely. To get started,
- read the documentation and you may wish to peruse some of these files
- from my home directory. First of all, the <tt>.app_notifier.yml</tt> file:
- </p>
- <pre>
- commands:
- default:
- - /home/shlomif/bin/desktop-finish-cue
- cookie:
- - /home/shlomif/bin/desktop-finish-cue
- - "--song"
- - "/home/music/Music/dosd-mp3s/Cookie.mp3"
- client:
- targets:
- default:
- url: "http://localhost:6300/"
- lap:
- url: "http://lap.shlomifish.org:6300/"
- </pre>
- <p>
- The <tt>desktop-finish-cue</tt> file:
- </p>
- <pre>
- #!/bin/bash
- song="/home/music/Music/dosd-mp3s/Theme - Eurovision.mp2"
- param="$1"
- shift
- if test "$param" = "--song"; then
- arg="$1"
- shift
- song="$arg"
- fi
- xmessage "Your task has been finished! Go check it out." &
- mplayer "$song"
- </pre>
- <p>
- And the <tt>finish-server</tt> script:
- </p>
- <pre>
- #!/bin/bash
- cd "$HOME"/progs/perl/alert/http-based/hg/App-Notifier-Service &&
- perl ./bin/app.pl --port=6300
- </pre>
- <hr />
- <p>
- Otherwise, if you're in the Tel Aviv or vicinity, you are invited to
- <a href="http://mail.perl.org.il/pipermail/perl/2012-July/012671.html">the
- next Tel Aviv Perl Mongers meeting on Wednesday, 25 July 2012</a>. Otherwise,
- I wish to note that I have written my first Java golf program as part
- of <a href="http://golf.shinh.org/p.rb?Alphabet+texture+">Anarchy golf’s
- “Alphabet Texture” challenge</a> (Anarchy golf accepts challenges in many
- languages). At 167 bytes, it is over 3 times longer than the shortest Perl
- entry which is only 50 bytes (my Perl solution is 52 bytes). But it
- was fun to write. For your information,
- <a href="http://en.wikipedia.org/wiki/Code_golf">code golf</a> is a challenge
- in which, participating programmers are challenged to write the shortest
- program that achieves a certain objective. I find it fun and addictive.
- </p>
- </div>
- <div class="entry" id="tech_tip_packaging_cpan_distributions_in_mageia">
- <ul class="info">
- <li><b>Date:</b> 16-08-2012</li>
- <li class="tags">perl, cpan, tip, tech, tech tip, mageia, linux</li>
- </ul>
- <h1>Tech Tip: How to Package and Maintain CPAN Distributions in Mageia</h1>
- <p>
- <a href="http://www.mageia.org/">Mageia Linux</a> is an RPM-based
- Linux distribution, whose repositories contain
- <a href="http://jquelin.blogspot.co.il/2012/07/more-than-3000-perl-packages-in-mageia.html">over
- 3,000 CPAN packages</a>, and part of the reason why it has so many is
- because Jerome Quelin and the other maintainers have worked on tools to
- facilitate creating Mageia packages for CPAN distributions and maintaining
- them.
- </p>
- <p>
- However, I was a little confused about using
- <a href="https://metacpan.org/release/App-Magpie">magpie</a>, so I'd like
- to share my findings here:
- </p>
- <ol>
- <li>
- <p>
- In order to import, upload and submit a new CPAN package into Mageia,
- along with all of its dependencies, one should not use magpie, but rather
- <a href="https://metacpan.org/release/App-CPAN2Pkg">cpan2pkg</a>. Its use
- is very simple: make <tt>rpm</tt> and <tt>urpmi</tt> sudoable, and type
- <tt>cpan2pkg Package::Name</tt> from the command-line inside an X terminal.
- This will start a Tk window where one can monitor the progress of preparing
- new RPM packages and it has an entry box to create more packages (which
- saves time on re-initialising CPAN.pm or CPANPLUS.pm).
- </p>
- </li>
- <li>
- <p>
- In order to upgrade a package, one can type
- <tt>eval $( magpie co -s perl-[PACKAGE_NAME] )</tt> and then
- <tt>magpie update</tt>. magpie requires <a href="https://metacpan.org/release/CPAN-Mini">minicpan</a> to be installed and updated.
- </p>
- </li>
- <li>
- <p>
- In order to install packages, one can do
- <tt>sudo urpmi 'perl(Package::Name)'</tt>. My
- <a href="https://metacpan.org/release/Module-Format">Module-Format module</a>
- facilitates the translation from other notations for writing modules:
- </p>
- <pre>
- up()
- {
- sudo urpmi --auto $(perlmf as_rpm_colon "$@")
- }
- </pre>
- </li>
- </ol>
- </div>
- <div class="entry" id="tpf_debugger_grant_and_new_cpan_distributions">
- <ul class="info">
- <li><b>Date:</b> 01-09-2012</li>
- <li class="tags">perl, foundation, tpf, grant, debugger, cpan, ruby</li>
- </ul>
- <h1>Grant for Improving the Perl Debugger + New CPAN Distributions</h1>
- <p>
- First of all, I am glad to announce that the Perl Foundation grant
- committee has accepted my
- <a href="http://news.perlfoundation.org/2012/08/2012q3-grant-proposal-adding-t.html">grant
- proposal for adding tests and refactoring the built-in perl debugger</a>.
- Here is <a href="http://news.perlfoundation.org/2012/08/2012q3-grant-proposals---resul.html">the announcement</a> for which grant proposals were
- accepted. My grant manager for this grant is
- <a href="http://alanhieu.ml/">Alan Haggai Alavi</a>, whom I've been
- talking with online and have collaborated on a few projects, so I'm really
- happy to work with him again.
- </p>
- <p>
- I have already made some progress with the grant (and this post is part
- of it), and sent a log for Alan Haggai to post as a grant update.
- </p>
- <p>
- That put aside, I'd now like to publicise some of the new distributions
- I have uploaded to CPAN, as I had some ideas for new ones, and am also
- contemplating making enough uploads to have 100 CPAN distributions or more:
- </p>
- <ol>
- <li>
- <p>
- <a href="https://metacpan.org/release/WWW-LinkChecker-Internal">WWW-LinkChecker-Internal</a>
- is a distribution wrapping a script that checks for internal broken links. I
- released the first three versions of it in a day, and it uses WWW::Mechanize.
- The reason why I wrote it was that the WDG HTML validator reported some broken
- links in one of my sites, but not their origins, so I had to trace them in
- a different way, and ended up writing that.
- </p>
- </li>
- <li>
- <p>
- <a href="https://metacpan.org/release/Inline-Ruby">Inline-Ruby</a> is
- an Inline:: distribution I adopted that allows to embed Ruby code inside
- Perl programs. I applied some fixes for it (some of which were not released
- to CPAN yet and some are ugly workarounds), and am planning to maintain it
- further down the road.
- </p>
- </li>
- <li>
- <p>
- <a href="https://metacpan.org/release/Test-TrailingSpace">Test-TrailingSpace</a>
- is a <tt>Test::</tt> namespace distribution for verifying that your code
- does not contain trailing space. Death to trailing space!
- </p>
- </li>
- </ol>
- <p>
- A final anecdote is that when working on one of my CPAN modules I found the
- <tt>b [filename]:[line_num]</tt> feature that I implemented in the perl
- debugger to be of great help, and can be content that I'm eating my own
- dogfood.
- </p>
- <p>
- Cheers for now.
- </p>
- </div>
- <div class="entry" id="tech_tip_overriding_eumm_compiler">
- <ul class="info">
- <li><b>Date:</b> 09-09-2012</li>
- <li class="tags">tech, tip, tech tip, perl, eumm, compiler, gcc, clang</li>
- </ul>
- <h1>Tech Tip: Overriding the C compiler with ExtUtils::MakeMaker</h1>
- <p>
- In order to override the C compiler with ExtUtils::MakeMaker, one can
- do something like:
- </p>
- <pre>
- perl Makefile.PL CC=/usr/bin/clang
- </pre>
- <p>
- Which will make the "CC" variable in the generated makefile be set to
- <tt>/usr/bin/clang</tt> instead of the default. Apparently, setting …
Large files files are truncated, but you can click here to view the full file