FiniWiki, Powered by Foswiki Free and Open Source Wiki
RichmondPM > WebHome
FiniWiki webs: Main | System | Sandbox   Login or Register
Users | Groups | Offices | Changes | Index | Search | Go

Richmond Perl Mongers

This is the wiki for Richmond Perl Mongers (Richmond.pm). Some of the information on this wiki is carefully controlled, but for the most part feel free to make contributions and suggestions.

Oops!

RichmondPM bug report, "Wiki login from richmond.pm.org page fails."

  • The wiki may place you on the wrong page after login.
  • Though login seems to fail, you can move to the valid web page after "failure" and everything should work.
  • Alternatively, log in and edit from wiki.fini.net, and the issue should vanish.
  • As there is a workaround, it may take some time to fix.

-- JohnLundin - 30 Dec 2008

Meetings

2009

Thursday, January 8th (tentative): no meeting yet planned.

Interested in starting up again for the new year? If so, or to discuss a change in meeting time and date, please drop a line on the discussion list.

-- JohnLundin - 30 Dec 2008

Resources

Richmond Perl Mongers has a discussion list.

Articles

PossibleMeetingPlaces by ChristopherHicks

Perl Hacks Richmond.pm's favorite perl hacks.

Supplementary Prototypes Discussion

--Matt Avitable (August 10, 2006)

Bundle your Perl code into a CPAN-style distribution.

--Steve Kirkup(May 18th, 2006)

Testing Modules A quick overview of modules that can be used to supplement your distributions.

--Steve Kirkup(Apr 28th, 2006)

Extra note on the above testing modules article. Steve mentioned Test::Class last PM meeting. I was a bit worried it would be overkill, but it turns out that it makes tests easier to write. As an added bonus, you can group the tests logically within subroutines, and have the benefit of simple setup/teardown hooks. This module is definitely worth a look if you are testing lots of code.

One (very minor) gotcha is that Test::Class uses Attribute::Handlers. That's not a bad thing, but if you had the masochistic idea of running your tests from a mod_perl environment, don't expect it to work. Attribute::Handlers uses CHECK blocks, which never run in mod_perl.

-Matt Avitable

Perl How-To Simple advice on doing things in Perl.

-- JohnIngersoll - 26 Aug 2008

Historic

Earlier Meetings

Sep 2008 Meeting canceled, for a (hopefully short) hiatus.

June 2008

* A social meeting took place on the 12th @ Panera Bread, Parham & Staples Mill Rd., Richmond.

May 2008

* Meeting on the 8th, at the Tuckahoe Library, 5-7PM.

Pod Perspectives was part of the discussion. The page referenced was created with pod2html. If any are interested, it's possible to create a twiki-style page from pod with Pod::Simple::Wiki[::Twiki] from CPAN. Once installed, you can run something like

pod2wiki --style twiki perlmodstyle.pod >/data1/Projex/Pod/lib/perlmodstyle.twiki; see perlmodstyle in twiki

We also discussed various aspects of allowing 0 (zero) to be a valid return value (not evaluate as false), e.g. the string '0 but true' works as 0, without warning, in a numeric context (a Perl hack). For reference we had this PerlMonks thread.

April 2008

Discussed a variety of subjects: Possibility of changing the wiki software on this site, possibility of setting up a r.pm repository (probably git based) to exchange ideas in code development, plus a beginning of discussion on Pod.

-- JohnIngersoll - 13 Apr 2008

March 2008

A Social/Planning Meeting happened Thursday the 13th, at the new Panera Bread located at the corner of Parham & Staples Mill Rd., starting roughly around 5PM. Results:
  • Everyone present was fine with the date/time.
  • Next month's meeting may be at the Tuckahoe library. Appropriate announcement will precede such.
  • Possible upcoming topic is use of Perl in mail processing.

A variety of subjects were discussed (Perl and non-).

From the I-shoulda-known-dept: This writer was complaining at the meeting about how cumbersome finding a specific function in "man perlfunc". Well, that's what perldoc -f is for. :-/

Not totally Off-Topic: As promised, the ~/.emacs entry to enable vi-like parens (and brackets) matching:
;; By an unknown contributor: match '(' ')' like vi %
          
(global-set-key "%" 'match-paren)

(defun match-paren (arg)
  "Go to the matching paren if on a paren; otherwise insert %."
  (interactive "p")
  (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
   ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
   (t (self-insert-command (or arg 1)))))

(Damian Conway has a somewhat more straightforward example in Perl Best Practices, p.11)

-- JohnIngersoll - 16 Mar 2008

September 2007

A social meeting took place on Thursday the 13th @ about 5 -7PM. Panera Bread, 1601 Willow Lawn Drive, Richmond, Va -- JohnIngersoll - 18 Sep 2007

August 2007

Thursday the 9th we had a technical meeting at the Tuckahoe Branch, Henrico Library, 1901 Starling Drive, Richmond, VA 23229. Chris Hicks led a discussion of Perl references.

July 2007

This technical meeting took place on the 12th at the Tuckahoe Branch, Henrico Library, 1901 Starling Drive, Richmond, VA 23229. Had the absolute minimum number attending that still allows dialog. The main discussion was about revision control systems.

June 2007 The meeting on the 14th of June had four attending. There was some discussion about a simple menuing for command-line perl.

One simple option is to use Term::Menu. This is done with
#!/usr/bin/perl -w
use strict 'vars';
use Term::Menu;
my $prompt = new Term::Menu;
my %menu;
my @opts = ("red", "green", "blue", "other");
my $j;
for ($j=0; $j < scalar @opts; $j++) {
    $menu{"$opts[$j]"} = ["$opts[$j]", $j];
}
$menu{EXIT} = ["EXIT", $j];
my $user_sel = 'ENTER';
while ($user_sel !~ /EXIT/) {
    $user_sel = $prompt->menu(%menu);
    print "You get $user_sel\n";
    # do something with selection
}
You might notice however that since %menu is a hash, the entries don't display in order. A simple test with Tie::InsertOrderHash has shown (most likely) a solution. Above, define the %menu hash as
tie my %menu => 'Tie::InsertOrderHash';

Another option is to use dialog; (This simple example has the Perl program reading STDERR for entered selection) :
#!/usr/bin/perl
use strict;
my $DIALOG_BIN = "/usr/bin/dialog --clear "
    . "--backtitle \"Select Color\" ";

my @menu = ("A\tRed",
            "B\tGreen",
            "C\tBlue",
            "D\tOther"
            );

my $menu_string;
foreach my $item (@menu) {
    my ($opt, $desc) = split ("\t", $item);
    $menu_string .= "\"$opt\" \"$desc\" ";
}

my $outfile = "/tmp/dialog.out.$$";
my $menu_height = $#menu + 1;

my $rc = system ("$DIALOG_BIN --menu \"Please Enter an Option Letter\" 20 50 "
                 . "$menu_height $menu_string 2> $outfile");

open (my $OFILE, "< $outfile");
my $char = <$OFILE>;
close $OFILE;
Thanks to Mark Pruett for getting me started on that.

For a more sophisticated gui i/face there's PerlTK . See also the (Unauthorized?) TK package on CPAN A slight learning curve for those not used to widgets. -- JohnIngersoll - 19 Jun 2007

April/May 2007 The May meeting had two attendees including the writer. Ok, It didn't have the drawing power that a lofting pink flamigo, disintegrating light saber, and wacky headgear provided in April. But we did banter about some ideas, one of which is an interactive Perl tutorial for the site. We'll discuss more with the majority. -- JohnIngersoll - 10 May 2007

March 2007 A small group met this time. Ok, so no specific topic was announced here :-/ !! We'll do better...

February 2007 On 8-Feb-2007 we had a discussion of various topics and a demo of writing OO Perl from scratch.

January 2007: We met around 5pm, Thursday, 11-January-2007, at Panera Bread, 1601 Willow Lawn Drive. The discussions included use of references, esp. hash references.

December 2006: A social meeting ran from ~ 5 to 7pm, December 14, 2006 at Panera Bread, 1601 Willow Lawn Drive. Allan walked us through an application using XML::Twig.

November 2006: Our meeting at Panera Bread, Willow Lawn had a brief discussion of Template Toolkit followed by a demo by Allan of mod-perl in his working web site http://tfhs.net/.

October 2006: A social meeting occured around 5pm, October 12th, 2006, at the new Panera Bread at 1601 Willow Lawn Drive. Matt provided us with a good intro to Mod_perl basics. -- JohnIngersoll - 13 Oct 2006

September: A social meeting was held at 5pm, September 14th, 2006, at Panera Bread, 1601 Willow Lawn Drive. The primary topic was Perl regular expressions and discussion regarding what would suit the group best regarding a more permanent place. -- John Ingersoll

August: A social meeting occured on or about 5pm, August 10th, 2006 at the Innsbrook Panera Bread location. One result of the meeting was the beginning of a Perl Hacks section in the wiki.

July: As of July 5th, we expect to hold yet another social meeting at 5pm, July 13th, 2006 at Panera Bread on Broad Street, about midway between Gaskins and Cox Roads. Topics and future programs welcome...

June: At 5pm on June 8th, we held a (very sparse) social meeting at Panera Bread, Innsbrook, on Broad Street.

May: At 5pm on May 11th, we held a social meeting at Panera Bread on Broad Street.

April: We held a social meeting at 5pm, April 13th, 2006 at Panera Bread on Broad Street, about midway between Gaskins and Cox Roads.

March: This meeting was canceled.

Febuary: Originally scheduled for the 9th, it was moved to the 16th at 4pm. To learn more please read MeetingFeb2006.

January: Notes from the first meeting are available at MeetingJan2006.

Wiki

FiniWiki.RichmondPM Web: Warning: Can't find topic .WebSiteTools

FiniWiki.%TWIKIWEB% Web:
  • %TWIKIWEB%.WelcomeGuest: Look here first to get you rolling on FiniWiki.
  • %TWIKIWEB%.TWikiSite: Explains what a FiniWiki site is.
  • %TWIKIWEB%.TWikiRegistration: Create your account in order to edit topics.
  • How to edit text:
    • %TWIKIWEB%.GoodStyle: Things to consider when changing text.
    • %TWIKIWEB%.TextFormattingRules: Easy to learn rules for editing text.
    • %TWIKIWEB%.TextFormattingFAQ: Answers to frequently asked questions about text formatting.

Notes: Warning: Can't find topic .YouAreHere
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding FiniWiki? Send feedback