From william at knowmad.com Tue Jun 7 11:44:29 2005 From: william at knowmad.com (William McKee) Date: Tue, 7 Jun 2005 14:44:29 -0400 Subject: [Charlotte.PM] Fwd: [Announce] ActiveState Launches ActivePerl, ActivePython & ActiveTcl for Mac OS X version 10.4 "Tiger" Message-ID: <20050607184429.GP26648@knowmad.com> Here's one for the Macophiles in the crowd! (Now that Mac's will be built on Intel hardware, I might be able to finally run OS X on my desktop). ----- Forwarded message from Kerry Taylor ----- > To: announce at listserv.ActiveState.com > From: Kerry Taylor > Date: Tue, 7 Jun 2005 07:07:01 -0700 > Subject: [Announce] ActiveState Launches ActivePerl, > ActivePython & ActiveTcl for Mac OS X version 10.4 "Tiger" > > ActiveState Launches ActivePerl, ActivePython & ActiveTcl for Mac OS X > version 10.4 "Tiger" > ActiveState's World-Renowned Open Source Language Distributions are Free to > the Developer Community > > WWDC 2005, SAN FRANCISCO, CA - June 7, 2005 - ActiveState, a leading > provider of developer tools and services for dynamic languages, today > announced the release of ActiveState's ActivePerl, ActivePython & ActiveTcl > open source language distributions for Mac OS X version 10.4 "Tiger". > ActiveState's language distributions are world-renowned as the most > complete, best maintained, and easiest to use cross-platform language > solutions in the market. The three new distributions for Tiger offer the > same innovative features, quality assurances and seamless integration that > have made ActiveState the industry-standard and number one resource for > open source language distributions. Since their launch eight years ago, > millions of developers have relied upon ActiveState's quality assured open > source language distributions worldwide. > > "The demand for ActiveState's languages and developer tools for Tiger is > intense," says David Ascher, ActiveState's Chief Technologist. "Our > initiative starts with the launch of ActivePerl, ActivePython and ActiveTcl > to meet the developer need for up-to-date and maintained distributions on > the Mac OS X platform. Our commitment continues with a beta release this > summer of our Komodo IDE ported to Tiger." > > "Hundreds of breakthrough features make Tiger the most advanced OS in the > world," said Ron Okamoto, Apple's vice president of Worldwide Developer > Relations. "We are thrilled to see ActiveState providing ActivePerl, > ActivePython and ActiveTcl to create a best-of-breed open source > productivity environment for script developers on Mac OS X." > > ActiveState's language distributions enable Mac programmers to keep their > Perl, Python & Tcl packages seamlessly up-to-date. ActivePerl contains core > Perl, the Perl Package Manager (PPM) for installing CPAN packages, popular > modules, and complete online help. ActivePython ships with a wealth of > documentation for both new and experienced Python programmers. ActiveTcl > delivers Tcl, Tk and the essential modules for Tcl programming. > ActiveState's language distributions allow programmers to develop across > platforms with quality assured standards on Mac OS X (10.3 and 10.4), Linux, > Solaris and Windows. ActivePerl, ActivePython & ActiveTcl are provided free > to the community as part of ActiveState's support for dynamic languages. > > Pricing & Availability > > ActivePerl, ActivePython & ActiveTcl are immediately available as free > downloads from www.ActiveState.com/Languages. ActiveState offers OEM > licensing for including ActivePerl, ActivePython or ActiveTcl with your > products, services and publications. Contact Sales at ActiveState.com for OEM > license inquires. > > About ActiveState > > ActiveState is the leading provider of tools for dynamic languages such as > Perl, PHP, Python, Tcl and XSLT. Millions of developers rely on > ActiveState's professional development tools, high-quality language > distributions and enterprise services. www.ActiveState.com > > Media & Analyst Inquiries: > > Kerry Taylor, ActiveState > 1.604.484.6837 > KerryT at ActiveState.com > > ? 2005 ActiveState, a division of Sophos > All product and company names herein may be trademarks of their respective > owners > > _______________________________________________ > Announce mailing list > Announce at listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ----- End forwarded message ----- -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Mon Jun 13 19:18:59 2005 From: william at knowmad.com (William McKee) Date: Mon, 13 Jun 2005 22:18:59 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm Message-ID: <20050614021859.GW8274@knowmad.com> Greetings Charlotte Perl Mongers, Choosing a template system for your Perl projects can be a challenge. In the Perl tradition, there's more than one way to do it. Whether you are using a homegrown solution or have chosen a favorite from amongst the hoards on CPAN, each solution has its pros and cons. Come out to the meeting this month to see how some of the competitors stack up. We'll be reviewing some of the following solutions: Petal HTML::Template Template Toolkit Text::Bind Text::Template Next month, we'll hear Dale Lancaster of Choicepoint present the solution his team uses to perform software configuration management on a constantly changing website with multiple servers using a single code base and making multiple feature releases per week. See you at the meeting, William McKee What: June Perl Mongers Meeting When: Thursday June 16th, 7:00 pm Where: Suite 200, 14120 Ballantyne Corporate Place For more information, contact William McKee at william at knowmad.com or by phone at (704) 343-9330. You can also visit our web site at http://charlotte.pm.org. Directions to meeting: 14120 Ballantyne Corporate Place Suite 200 Charlotte NC 485 to Johnson Road Johnson Road to first stop light (John J Delaney Dr) Right on Delaney, go 1 block then right onto Brixham Hill Dr. Go to dead-end, make a left onto Ballantyne Corporate Place Once on Ballantyne Corporate Place, go to the second building on the right (you pass a little pond on your right which is just before the building you need to go into. The parking lot is in the back of the building, you will have to go past the building, make a right and then a right again Elevator to the second floor, right off the elevator into Suite 200. It is possible the outside doors could be locked after 7. So if someone shows up a little late, they will need to call 704-953-4470 so we can go down and let them in. -- Knowmad Services Inc. http://www.knowmad.com From kwhitsel at gmail.com Mon Jun 13 20:20:19 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Mon, 13 Jun 2005 23:20:19 -0400 Subject: [Charlotte.PM] The Template Challenge In-Reply-To: <36540a8405061320192c1167b@mail.gmail.com> References: <20050524131647.GS1383@knowmad.com> <36540a8405061320192c1167b@mail.gmail.com> Message-ID: <36540a84050613202066391029@mail.gmail.com> Hey all, Here is a very simple Template Toolkit solution for the Template Challenge. Thanks for the data file William. Kurt On 5/24/05, William McKee wrote: > Mongers, > > It's time for the Template Challenge. The idea is to show off the syntax > and capabilities of the various template engines used by group members > to learn new tricks and techniques. > > At the meeting last week, we drew up a sample HTML page which each > template must generate along with some sample data. I've taken this > data and placed it into the DATA section of a script which you can use > to process your template. In addition, your template should calculate > the total number of records and display its name (version optional). > > All templates must output accurate results based on the data but feel > free to embellish the markup. We'll run the submissions and compare the > results at our June meeting including checking for valid HTML/XHTML > syntax so run your output through tidy or the HTML Validator at W3C[1]. > > So far, here are the list of entries: > > Template Engine Champion(s) > --------------- -------- > Petal William M > Template Toolkit Kurt W > Text::Bind William M > > Popular engines without champions: > HTML::Template > Text::Template > Mason > > If your favorite is not in the list or does not have a champion, please > use the attached templates to submit an entry to the mailing list. Feel > free to submit an entry for an existing engine; after all, there's more > than one way to do it. Play as often as you'd like. > > I'm looking forward to seeing the results at our next meeting on June > 16th (location is still being determined, stay tuned!). > > William > > [1] http://www.w3.org > > -- > Knowmad Services Inc. > http://www.knowmad.com > > > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: template.pl Type: application/octet-stream Size: 1395 bytes Desc: not available Url : http://mail.pm.org/pipermail/charlotte/attachments/20050614/151edcca/template.obj -------------- next part --------------

Charlotte Perl Mongers

2005 Template Challenge - TEMPLATE ENGINE

[% SET COUNT = 0 %] [% FOREACH record = records -%] [% COUNT = COUNT + 1 %] [% END %]
Name Phone Res/
Comm *
[% record.first %] [% record.last %] [% record.phone %] [% IF record.res %]Res[% ELSE %]Comm[% END %]

Total Records = [% COUNT %]


* Residential or Commerical listing

From kwhitsel at gmail.com Tue Jun 14 05:30:22 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Tue, 14 Jun 2005 08:30:22 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm In-Reply-To: <20050614021859.GW8274@knowmad.com> References: <20050614021859.GW8274@knowmad.com> Message-ID: <36540a8405061405305ebb89a3@mail.gmail.com> Ok, here is a simple HTML::Template solution. Again, thanks William for creating this data file. Its a great format for testing different templates like this. Now it would be great if someone out there did a Mason version. Come on guys, I know some of you know Mason really well. Kurt On 6/13/05, William McKee wrote: > Greetings Charlotte Perl Mongers, > > Choosing a template system for your Perl projects can be a challenge. In the > Perl tradition, there's more than one way to do it. Whether you are using a > homegrown solution or have chosen a favorite from amongst the hoards on CPAN, > each solution has its pros and cons. > > Come out to the meeting this month to see how some of the competitors stack up. > We'll be reviewing some of the following solutions: > > Petal > HTML::Template > Template Toolkit > Text::Bind > Text::Template > > Next month, we'll hear Dale Lancaster of Choicepoint present the > solution his team uses to perform software configuration management on a > constantly changing website with multiple servers using a single code > base and making multiple feature releases per week. > > > See you at the meeting, > William McKee > > > What: June Perl Mongers Meeting > > When: Thursday June 16th, 7:00 pm > > Where: Suite 200, 14120 Ballantyne Corporate Place > > For more information, contact William McKee at william at knowmad.com or by > phone at (704) 343-9330. You can also visit our web site at > http://charlotte.pm.org. > > > Directions to meeting: > 14120 Ballantyne Corporate Place > Suite 200 > Charlotte NC > > 485 to Johnson Road > Johnson Road to first stop light (John J Delaney Dr) > Right on Delaney, go 1 block then right onto Brixham Hill Dr. > Go to dead-end, make a left onto Ballantyne Corporate Place > Once on Ballantyne Corporate Place, go to the second building on the right > (you pass a little pond on your right which is just before the building you > need to go into. > The parking lot is in the back of the building, you will have to go past the > building, make a right and then a right again > Elevator to the second floor, right off the elevator into Suite 200. > It is possible the outside doors could be locked after 7. So if someone shows > up a little late, they will need to call 704-953-4470 so we can go down and let > them in. > > > -- > Knowmad Services Inc. > http://www.knowmad.com > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte > -------------- next part -------------- A non-text attachment was scrubbed... Name: htmlTemp.tmpl Type: application/octet-stream Size: 1110 bytes Desc: not available Url : http://mail.pm.org/pipermail/charlotte/attachments/20050614/298cdebd/htmlTemp.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: template.pl Type: application/octet-stream Size: 1516 bytes Desc: not available Url : http://mail.pm.org/pipermail/charlotte/attachments/20050614/298cdebd/template.obj From william at knowmad.com Thu Jun 16 03:46:16 2005 From: william at knowmad.com (William McKee) Date: Thu, 16 Jun 2005 06:46:16 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm In-Reply-To: <36540a8405061405305ebb89a3@mail.gmail.com> References: <20050614021859.GW8274@knowmad.com> <36540a8405061405305ebb89a3@mail.gmail.com> Message-ID: <20050616104616.GB26492@knowmad.com> > Ok, here is a simple HTML::Template solution. Thanks Kurt. > Now it would be great if someone out there did a Mason version. Come > on guys, I know some of you know Mason really well. And a Template Toolkit solution would be nice to see as well. So far here's the showing we have: HTML::Template Petal Text::Bind Text::Template See you tonite, William -- Knowmad Services Inc. http://www.knowmad.com From kwhitsel at gmail.com Thu Jun 16 03:50:26 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Thu, 16 Jun 2005 06:50:26 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm In-Reply-To: <20050616104616.GB26492@knowmad.com> References: <20050614021859.GW8274@knowmad.com> <36540a8405061405305ebb89a3@mail.gmail.com> <20050616104616.GB26492@knowmad.com> Message-ID: <36540a84050616035020813f71@mail.gmail.com> ok Here is a simpleTemplate Toolkit solution. On 6/16/05, William McKee wrote: > > Ok, here is a simple HTML::Template solution. > > Thanks Kurt. > > > Now it would be great if someone out there did a Mason version. Come > > on guys, I know some of you know Mason really well. > > And a Template Toolkit solution would be nice to see as well. So far > here's the showing we have: > > HTML::Template > Petal > Text::Bind > Text::Template > > > See you tonite, > William > > -- > Knowmad Services Inc. > http://www.knowmad.com > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte > -------------- next part -------------- A non-text attachment was scrubbed... Name: tempToolKit.tmpl Type: application/octet-stream Size: 1121 bytes Desc: not available Url : http://mail.pm.org/pipermail/charlotte/attachments/20050616/564aeee3/tempToolKit.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: template.pl Type: application/octet-stream Size: 1465 bytes Desc: not available Url : http://mail.pm.org/pipermail/charlotte/attachments/20050616/564aeee3/template.obj From kwhitsel at gmail.com Thu Jun 16 04:06:30 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Thu, 16 Jun 2005 07:06:30 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm In-Reply-To: <20050616104616.GB26492@knowmad.com> References: <20050614021859.GW8274@knowmad.com> <36540a8405061405305ebb89a3@mail.gmail.com> <20050616104616.GB26492@knowmad.com> Message-ID: <36540a8405061604063287f6bf@mail.gmail.com> One quick correction Forgot to remove the [% SET COUNT = 0 %] line from the HTML::Template template This is code for the Template Toolkit template Sorry about that On 6/16/05, William McKee wrote: > > Ok, here is a simple HTML::Template solution. > > Thanks Kurt. > > > Now it would be great if someone out there did a Mason version. Come > > on guys, I know some of you know Mason really well. > > And a Template Toolkit solution would be nice to see as well. So far > here's the showing we have: > > HTML::Template > Petal > Text::Bind > Text::Template > > > See you tonite, > William > > -- > Knowmad Services Inc. > http://www.knowmad.com > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte > From diona at studio12a.com Thu Jun 16 07:37:45 2005 From: diona at studio12a.com (Diona Kidd) Date: Thu, 16 Jun 2005 10:37:45 -0400 Subject: [Charlotte.PM] June Perl Mongers Meeting - Thursday, June 16th at 7:00pm In-Reply-To: <36540a8405061604063287f6bf@mail.gmail.com> References: <20050614021859.GW8274@knowmad.com> <36540a8405061405305ebb89a3@mail.gmail.com> <20050616104616.GB26492@knowmad.com> <36540a8405061604063287f6bf@mail.gmail.com> Message-ID: <9287957a0a7d529753bac5325937ca4e@studio12a.com> Hi all, I've opted to represent Mason since it's a highly used template engine. It takes a bit of setup so I've created an example on my website at http://modernflow.com/template_example.htm . The code example is attached. This example is using an additional Mason module called MasonX-Lexer-MSP (http://search.cpan.org/~jwilliams/MasonX-Lexer-MSP-0.11/MSP.pm) so the substitution tag is altered. Instead of using <% %>, it uses <%= %>. See you this evening! Diona Modern Flow, LLC "Form and function as one" ------------------------------------ diona at modernflow.com http://www.modernflow.com Office: 704.347.2886 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/charlotte/attachments/20050616/a284c82f/template_example.htm From cfowler at outpostsentinel.com Thu Jun 16 13:00:08 2005 From: cfowler at outpostsentinel.com (Christopher Fowler) Date: Thu, 16 Jun 2005 16:00:08 -0400 Subject: [Charlotte.PM] cdrecord wrapper. Message-ID: <1118952008.27260.137.camel@shuttle.linxdev.com> I was bored one night and got tired of all the crap that was displayed from cdrecord. I wrote this wrapper. Maybe you guys and gals might like it and make it better. I wrote this on FC3. --- Cut Here -------------------------------------------- #!/usr/bin/perl use POSIX ":sys_wait_h"; use Getopt::Std; use IO::Handle; use IO::Select; use vars qw/$opt_s $opt_d $optind/; use strict; # Globals $opt_s = 4; $opt_d = undef; my $selector = new IO::Select; my $cdrecord = "/usr/bin/cdrecord"; sub get_dev { my $dev = undef; open DEV, "cdrecord --scanbus -dev=ATA 2>&1 |"; while() { next unless m/DRU-530/; next unless m/^\s+(\d,\d,\d)/; $dev = $1; } return $dev; } sub main { getopts("s:d"); die "dvdburn.pl \n" unless $ARGV[$optind]; my $dev = get_dev() or die "Did not find DVD-RW device\n"; print "Device: ATA:$dev\n"; print "Speed : $opt_s\n"; print "Image File: $ARGV[$optind]\n"; pipe RP,WP or die "Pipe: $!\n"; pipe ERP, EWP or die "Pipe $!\n"; my $pid = fork(); # Child Code if($pid == 0) { open STDOUT, ">&WP" or die "PIPE Redirection: $!\n"; open STDERR, ">&EWP"; close RP; close ERP; STDOUT->autoflush(); STDERR->autoflush(); RP->autoflush(); my @args = (); push @args, $cdrecord; push @args, "-v"; push @args, "--dummy" if $opt_d; push @args, "--dev=ATA:$dev"; push @args, "--speed"; push @args, "$opt_s"; push @args, "-dao"; push @args, "-eject"; push @args, $ARGV[$optind]; exec @args or die "$!\n"; } # Parent close WP; close EWP; $selector->add(*RP); $selector->add(*ERP); my $data = ""; my $data_stderr = ""; my $percent = 0; while(1) { my ($rr, undef, $er) = IO::Select->select($selector, undef, $selector, undef) ; foreach my $fh (@$rr) { if($fh == *RP) { my $byte = ""; if(sysread($fh, $byte, 1) == 0) { close RP; while(waitpid($pid, WNOHANG) != $pid) { } if($? !=0 ) { print "\n"; print "CDRECORD STDERR: \n"; print "$data_stderr\n"; } print "\n"; return 0; } $data .= $byte; if ($data =~ m/Track 01:\s+(\d+)\sof\s(\d+)\sMB/) { my $ps = int($2 / 50); #print "\r$1:$2:$ps:(".($1 % $ps).""; if(($1 % $ps) == 0 && ($1 != 0)) { $percent++; $percent++; } print "\r"; my $bar = ""; for (my $i = 0; $i < $percent; $i++) { $bar .= "="; $i++; } $bar .= ">"; printf "Complete: [%-50.50s] %s\%\r", $bar, $percent; STDOUT->flush(); $data = ""; } } elsif($fh == *EWP) { my $byte = ""; sysread $fh, $byte, 1; $data_stderr .= $byte; } } } } exit main; # vi: set ts=2 sw=2: # ------------------------------------------------------------------- From glim at mycybernet.net Thu Jun 16 21:44:00 2005 From: glim at mycybernet.net (Gerard Lim) Date: Fri, 17 Jun 2005 00:44 -0400 Subject: [Charlotte.PM] Last-minute reminder -- YAPC::NA 2005 Message-ID: Here's a last reminder about Yet Another Perl Conference, North America (YAPC::NA 2005) http://yapc.org/America In case anyone out there has been sitting on the fence or has been meaning to register but has put it on the backburner until now, here is a final information package. Dates: Mon - Wed June 27 - 29, 2005 (11 days from now!) Location: 89 Chestnut Street, University of Toronto, Toronto, Ontario, Canada Accommodations ============== Due to recent renegotiations with the conference facility and hotel, 89 Chestnut, there are still a few rooms left. For details on accommodations go to: http://www.yapc.org/America/accommodations-2005.shtml For quick and easy booking: 89 Chestnut Phone: +1-416-977-0707 Conference booking code: perl0626 The base rate is approx. CAD$80/night, which is *great* for downtown Toronto. Add in taxes and in-room high speed internet and it's up to about CAD$95/night. Book yourself to check-in on Sunday the 26th and check-out on the morning of Wednesday the 29th. Conference Registration ======================= Registration is easy and cheap - only USD$85 - see http://yapc.org/America/register-2005.shtml for details or register directly online at http://donate.perlfoundation.org/index.pl?node=registrant%20info&conference_id=423 The schedule is awesome - http://yapc.org/America/schedule-2005/day1.html >From here, click on the "Day 2" and "Day 3" spots near the top to go from page to page. Click on a talk name to get details regarding the talk. Speakers include Larry Wall, Allison Randal, Autrijus Tang, Brian Ingerson, Andy Lester, chromatic, brian d foy, Chip Salzenberg & Dan Sugalski... and many more! [ This message was sent by Gerard Lim on behalf of the YAPC::NA 2005 Conference organizing committee of the Toronto Perl Mongers. Thanks for your patience and support. ] From kwhitsel at gmail.com Fri Jun 17 06:11:03 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Fri, 17 Jun 2005 09:11:03 -0400 Subject: [Charlotte.PM] another topic suggestion Message-ID: <36540a84050617061125dfb5d6@mail.gmail.com> perl frameworks cgi::application maypole etc. just a thought. Kurt From diona at studio12a.com Fri Jun 17 06:17:17 2005 From: diona at studio12a.com (Diona Kidd) Date: Fri, 17 Jun 2005 09:17:17 -0400 Subject: [Charlotte.PM] another topic suggestion In-Reply-To: <36540a84050617061125dfb5d6@mail.gmail.com> References: <36540a84050617061125dfb5d6@mail.gmail.com> Message-ID: <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> i think that's a great idea.... i'd also like to add design patterns to the idea pool. On Jun 17, 2005, at 9:11 AM, Kurt W. Whitsel wrote: > perl frameworks > > cgi::application > maypole > > etc. > > > just a thought. > > Kurt > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte From cfowler at outpostsentinel.com Sat Jun 18 18:48:26 2005 From: cfowler at outpostsentinel.com (Christopher Fowler) Date: Sat, 18 Jun 2005 21:48:26 -0400 Subject: [Charlotte.PM] Perl Tk Message-ID: <1119145706.27260.280.camel@shuttle.linxdev.com> Today I was bored and decided to play around with Perl TK. We have a Web app written in J2EE and I'm thinking about creating a utility the scrapes the pages and displays them in pseudo real time. My problem is that I've not figured out how to center the main window and ham hacing a hard time seeing good examples on the net. --- Cut Here ---- sub start_app { my($org, $user, $pass, $server) = undef; my $login = MainWindow->new(); $login->configure(-title => 'Login'); $login->geometry("+100+300"); my $frm1 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm1->pack(-side => 'top', -fill => 'x'); my $frm1_lbl1 = $frm1->Label ( -text => 'Server Address:'); $frm1_lbl1->pack( -side => 'left'); $server = $frm1->Entry( -width => 32, -background => 'white'); $server->pack( -side => 'right', -pady => 3); my $frm2 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm2->pack(-side => 'top', -fill => 'x'); my $frm2_lbl1 = $frm2->Label ( -text => 'Organization:'); $frm2_lbl1->pack( -side => 'left'); $org = $frm2->Entry( -width => 32, -background => 'white'); $org->pack( -side => 'right', -pady => 3); my $frm3 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm3->pack(-side => 'top', -fill => 'x'); my $frm3_lbl1 = $frm3->Label ( -text => 'Username:'); $frm3_lbl1->pack( -side => 'left'); $user = $frm3->Entry( -width => 32, -background => 'white'); $user->pack( -side => 'right', -pady => 3); my $frm4 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm4->pack(-side => 'top', -fill => 'x'); my $frm4_lbl1 = $frm4->Label ( -text => 'Password:'); $frm4_lbl1->pack( -side => 'left'); $pass = $frm4->Entry( -width => 32, -background => 'white'); $pass->pack( -side => 'right', -pady => 3); my $frm4 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm4->pack(-side => 'top', -fill => 'x'); my $submit = $frm4->Button( -text => 'Login', -command => sub { login_button;} ); $submit->pack(-side => 'left'); my $exit = $frm4->Button( -text => 'Cancel', -command => sub {exit 0;} ); $exit->pack(-side => 'right'); MainLoop(); } ------------------------ That code is simply to build a login window that when ran will prompt the user to log into our application. I've got all the login stuff done. It simply does a post on login.html with the org,user, and pass values. What I'm trying to do is center that window. Before I get any further is Perl Tk really usable or clunky. I like the fact that I can use perl to scrap our pages and do all the other nice things that perl can do. On the perl side I'm using the following regex to grok the fields from each that has data. --- Cut Here --- foreach my $line (@lines) { next unless $line =~ m/alarm_detail\.html\?id=(\d+).+?[center;| critical]">(.+?)<\/td>.+?center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+? center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+? center;">(.+?)<\/td>/; print INDEX "$line\n\n\n"; $ALARMS{$1}{'alarm_id'} = $1; $ALARMS{$1}{'level'} = $2; $ALARMS{$1}{'raised'} = $3; $ALARMS{$1}{'description'} = $4; $ALARMS{$1}{'location'} = $5; $ALARMS{$1}{'device'} = $6; $ALARMS{$1}{'alarm_name'} = $7; } ------------------------------------ Is there a way to simplify that regex? And on the last '>(.+?)<\/td>' It is possible that that could be '>' or '>User' If a user is not assigned to that alarm then there is nothing there. How can I fix that piece to match on '>' or '>Bob'. Thanks, Chris From cfowler at outpostsentinel.com Sat Jun 18 19:03:43 2005 From: cfowler at outpostsentinel.com (Christopher Fowler) Date: Sat, 18 Jun 2005 22:03:43 -0400 Subject: [Charlotte.PM] Perl Tk Message-ID: <1119146623.27260.290.camel@shuttle.linxdev.com> Today I was bored and decided to play around with Perl TK. We have a Web app written in J2EE and I'm thinking about creating a utility the scrapes the pages and displays them in pseudo real time. My problem is that I've not figured out how to center the main window and ham hacing a hard time seeing good examples on the net. --- Cut Here ---- sub start_app { my($org, $user, $pass, $server) = undef; my $login = MainWindow->new(); $login->configure(-title => 'Login'); $login->geometry("+100+300"); my $frm1 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm1->pack(-side => 'top', -fill => 'x'); my $frm1_lbl1 = $frm1->Label ( -text => 'Server Address:'); $frm1_lbl1->pack( -side => 'left'); $server = $frm1->Entry( -width => 32, -background => 'white'); $server->pack( -side => 'right', -pady => 3); my $frm2 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm2->pack(-side => 'top', -fill => 'x'); my $frm2_lbl1 = $frm2->Label ( -text => 'Organization:'); $frm2_lbl1->pack( -side => 'left'); $org = $frm2->Entry( -width => 32, -background => 'white'); $org->pack( -side => 'right', -pady => 3); my $frm3 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm3->pack(-side => 'top', -fill => 'x'); my $frm3_lbl1 = $frm3->Label ( -text => 'Username:'); $frm3_lbl1->pack( -side => 'left'); $user = $frm3->Entry( -width => 32, -background => 'white'); $user->pack( -side => 'right', -pady => 3); my $frm4 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm4->pack(-side => 'top', -fill => 'x'); my $frm4_lbl1 = $frm4->Label ( -text => 'Password:'); $frm4_lbl1->pack( -side => 'left'); $pass = $frm4->Entry( -width => 32, -background => 'white'); $pass->pack( -side => 'right', -pady => 3); my $frm4 = $login->Frame( -relief => "groove", -borderwidth => 3); $frm4->pack(-side => 'top', -fill => 'x'); my $submit = $frm4->Button( -text => 'Login', -command => sub { login_button;} ); $submit->pack(-side => 'left'); my $exit = $frm4->Button( -text => 'Cancel', -command => sub {exit 0;} ); $exit->pack(-side => 'right'); MainLoop(); } ------------------------ That code is simply to build a login window that when ran will prompt the user to log into our application. I've got all the login stuff done. It simply does a post on login.html with the org,user, and pass values. What I'm trying to do is center that window. Before I get any further is Perl Tk really usable or clunky. I like the fact that I can use perl to scrap our pages and do all the other nice things that perl can do. On the perl side I'm using the following regex to grok the fields from each that has data. --- Cut Here --- foreach my $line (@lines) { next unless $line =~ m/alarm_detail\.html\?id=(\d+).+?[center;| critical]">(.+?)<\/td>.+?center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+? center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+?center;">(.+?)<\/td>.+? center;">(.+?)<\/td>/; print INDEX "$line\n\n\n"; $ALARMS{$1}{'alarm_id'} = $1; $ALARMS{$1}{'level'} = $2; $ALARMS{$1}{'raised'} = $3; $ALARMS{$1}{'description'} = $4; $ALARMS{$1}{'location'} = $5; $ALARMS{$1}{'device'} = $6; $ALARMS{$1}{'alarm_name'} = $7; } ------------------------------------ Is there a way to simplify that regex? And on the last '>(.+?)<\/td>' It is possible that that could be '>' or '>User' If a user is not assigned to that alarm then there is nothing there. How can I fix that piece to match on '>' or '>Bob'. Thanks, Chris From william at knowmad.com Sat Jun 18 19:17:36 2005 From: william at knowmad.com (William McKee) Date: Sat, 18 Jun 2005 22:17:36 -0400 Subject: [Charlotte.PM] Perl Tk In-Reply-To: <1119145706.27260.280.camel@shuttle.linxdev.com> References: <1119145706.27260.280.camel@shuttle.linxdev.com> Message-ID: <20050619021736.GF17352@knowmad.com> Hi Chris, Sorry I've been so late about saying hello. Glad to have a displaced North Carolinian on the list . Hope you can get back and join us for some meetings. I'm surprised the Atlanta list is slow. Does the group there have regular meetings? BTW, thanks for sharing the cdrecord script. I don't use cdrecord much so am not sure what the benefits of your script are. Could you explain it a bit for us? > Before I get any further is Perl Tk really usable or clunky. I like the > fact that I can use perl to scrap our pages and do all the other nice > things that perl can do. I haven't used GUIs much but have always found Tk useful although a bit clunky. Have you looked at wxWidgets (formerly wxWindows) which uses native windowing libraries? There's a wxPerl library. > Is there a way to simplify that regex? And on the last '>(.+?)<\/td>' > It is possible that that could be '>' or '>User' If a user is > not assigned to that alarm then there is nothing there. How can I fix > that piece to match on '>' or '>Bob'. Couldn't you just change (.+?)<\/td>/ to (.*?)<\/td>/? Also, I'm swap out the match characters from m// to m|| to avoid the leaning toothpick syndrome in your regex. Finally, you may also want to consider HTML::TreeBuilder for parsing your HTML. Talk to you later, William -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Sun Jun 19 17:20:26 2005 From: william at knowmad.com (William McKee) Date: Sun, 19 Jun 2005 20:20:26 -0400 Subject: [Charlotte.PM] Perl Tk In-Reply-To: <1119148831.27260.307.camel@shuttle.linxdev.com> References: <1119145706.27260.280.camel@shuttle.linxdev.com> <20050619021736.GF17352@knowmad.com> <1119148831.27260.307.camel@shuttle.linxdev.com> Message-ID: <20050620002025.GI17352@knowmad.com> On Sat, Jun 18, 2005 at 10:40:31PM -0400, Christopher Fowler wrote: > I do not think many of the Perl lists are that busy. Probably just not > that many people out there looking to meet other programmers to discuss > problems with. Perl Monks is quite popular for discussing programming problems. The CharLUG (Linux) list gets a good bit of traffic as do many of the mailing lists for specific modules. Maybe Perl is doing too good of a job of providing support that local mailing lists are redundant. William -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Sun Jun 19 17:37:43 2005 From: william at knowmad.com (William McKee) Date: Sun, 19 Jun 2005 20:37:43 -0400 Subject: [Charlotte.PM] Results of The Template Challenge Message-ID: <20050620003743.GL17352@knowmad.com> At last week's meeting we had a good turnout to review six templating solutions[1]. We looked at the code, the template language and the output. For a couple of the templates, we added alternating color to the rows. The next challenge will include this feature as well as sortable column headers similar to Tk::DBI::Table. There was no clear winner although I think everyone learned more about some of the many alternatives on CPAN. Hopefully we'll get some other solutions at the next review. Thanks to Red F for allowing us to use their conference room and projector. Diona snapped a couple of pics which I've added to the wiki[2]. Due to vacations and other summer activities, we have chosen to have a holiday for the July meeting. The next meeting will be on August 18th to hear about how Dale Lancaster is employing SCM at Choicepoint. We hope to be able to use the Red F conference room once again. Look for the location in the next meeting announcement. I'll be attending YAPC next week in Toronto. I'll try to keep notes of the sessions that I attend and share them with the list when I get back. Is anyone else on the list going? Have a good summer, keep hacking Perl, and keep sharing your code, questions and ideas on the mailing list. Talk to you later, William [1] Text::Bind, Template Toolkit, Text::Template, Petal, Mason, HTML::Template [2] http://charlotte.pm.org/kwiki/index.cgi?Pictures -- Knowmad Services Inc. http://www.knowmad.com From william at knowmad.com Sun Jun 19 17:42:16 2005 From: william at knowmad.com (William McKee) Date: Sun, 19 Jun 2005 20:42:16 -0400 Subject: [Charlotte.PM] another topic suggestion In-Reply-To: <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> <36540a84050617061125dfb5d6@mail.gmail.com> References: <36540a84050617061125dfb5d6@mail.gmail.com> <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> <36540a84050617061125dfb5d6@mail.gmail.com> Message-ID: <20050620004216.GM17352@knowmad.com> On Fri, Jun 17, 2005 at 09:11:03AM -0400, Kurt W. Whitsel wrote: > perl frameworks > > cgi::application > maypole On Fri, Jun 17, 2005 at 09:17:17AM -0400, Diona Kidd wrote: > i'd also like to add design patterns to the idea pool. I've added both of these ideas to the wiki[1]. Is anyone willing to present on either of them? I'd be willing to talk about CGI::Application. Is anyone using Maypole or Mason or another framework that would be willing to present? What about design patterns or any of the other topics on the wiki[1]? Thanks, William [1] http://charlotte.pm.org/kwiki/index.cgi?MeetingTopics -- Knowmad Services Inc. http://www.knowmad.com From diona at studio12a.com Sun Jun 19 19:33:37 2005 From: diona at studio12a.com (Diona Kidd) Date: Sun, 19 Jun 2005 22:33:37 -0400 Subject: [Charlotte.PM] another topic suggestion In-Reply-To: <20050620004216.GM17352@knowmad.com> References: <36540a84050617061125dfb5d6@mail.gmail.com> <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> <36540a84050617061125dfb5d6@mail.gmail.com> <20050620004216.GM17352@knowmad.com> Message-ID: As far as the topic list goes, I'd be willing and able to contribute to the Class::DBI discussion as well as the Design Pattern topic. Maybe we should touch on anti-patterns (e.g. - 'spaghetti code') as well since they're just the opposite. I'm also very interested in the 'Creating Modules' discussion and the 'Testing & Test-driven Development'. I'm willing to contribute wherever I can... Diona On Jun 19, 2005, at 8:42 PM, William McKee wrote: > On Fri, Jun 17, 2005 at 09:11:03AM -0400, Kurt W. Whitsel wrote: >> perl frameworks >> >> cgi::application >> maypole > > On Fri, Jun 17, 2005 at 09:17:17AM -0400, Diona Kidd wrote: >> i'd also like to add design patterns to the idea pool. > > I've added both of these ideas to the wiki[1]. Is anyone willing to > present on either of them? I'd be willing to talk about > CGI::Application. Is anyone using Maypole or Mason or another framework > that would be willing to present? What about design patterns or any of > the other topics on the wiki[1]? > > > Thanks, > William > > [1] http://charlotte.pm.org/kwiki/index.cgi?MeetingTopics > > -- > Knowmad Services Inc. > http://www.knowmad.com From william at knowmad.com Sun Jun 19 19:41:58 2005 From: william at knowmad.com (William McKee) Date: Sun, 19 Jun 2005 22:41:58 -0400 Subject: [Charlotte.PM] another topic suggestion In-Reply-To: References: <36540a84050617061125dfb5d6@mail.gmail.com> <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> <36540a84050617061125dfb5d6@mail.gmail.com> <20050620004216.GM17352@knowmad.com> Message-ID: <20050620024158.GO17352@knowmad.com> On Sun, Jun 19, 2005 at 10:33:37PM -0400, Diona Kidd wrote: > As far as the topic list goes, I'd be willing and able to contribute to > the Class::DBI discussion as well as the Design Pattern topic. Maybe we > should touch on anti-patterns (e.g. - 'spaghetti code') as well since > they're just the opposite. I'm also very interested in the 'Creating > Modules' discussion and the 'Testing & Test-driven Development'. I'm > willing to contribute wherever I can... Thanks Diona. Would you be interested in working out the meeting schedule for Oct - Dec? Perhaps you could recruit some other folks from the group to help out. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com From diona at studio12a.com Sun Jun 19 19:55:27 2005 From: diona at studio12a.com (Diona Kidd) Date: Sun, 19 Jun 2005 22:55:27 -0400 Subject: [Charlotte.PM] another topic suggestion In-Reply-To: <20050620024158.GO17352@knowmad.com> References: <36540a84050617061125dfb5d6@mail.gmail.com> <913b516dcc9d0938f9a23e0f5c0cf14d@studio12a.com> <36540a84050617061125dfb5d6@mail.gmail.com> <20050620004216.GM17352@knowmad.com> <20050620024158.GO17352@knowmad.com> Message-ID: Sure, I'd love to. On Jun 19, 2005, at 10:41 PM, William McKee wrote: > On Sun, Jun 19, 2005 at 10:33:37PM -0400, Diona Kidd wrote: >> As far as the topic list goes, I'd be willing and able to contribute >> to >> the Class::DBI discussion as well as the Design Pattern topic. Maybe >> we >> should touch on anti-patterns (e.g. - 'spaghetti code') as well since >> they're just the opposite. I'm also very interested in the 'Creating >> Modules' discussion and the 'Testing & Test-driven Development'. I'm >> willing to contribute wherever I can... > > Thanks Diona. Would you be interested in working out the meeting > schedule for Oct - Dec? Perhaps you could recruit some other folks from > the group to help out. > > > Thanks, > William > > -- > Knowmad Services Inc. > http://www.knowmad.com > _______________________________________________ > charlotte mailing list > charlotte at pm.org > http://mail.pm.org/mailman/listinfo/charlotte From william at knowmad.com Mon Jun 20 12:02:28 2005 From: william at knowmad.com (William McKee) Date: Mon, 20 Jun 2005 15:02:28 -0400 Subject: [Charlotte.PM] YAPC Wiki Roster Message-ID: <20050620190228.GU17352@knowmad.com> Perl'ers, I have added Charlotte Perl Mongers to the list of Perl Mongers groups represented at YAPC . It is accessible from the Wiki main page at: http://wiki.yapctoronto.org/index.cgi?PerlMongers Add your name if you are attending. William -- Knowmad Services Inc. http://www.knowmad.com From diona at studio12a.com Sat Jun 25 05:22:59 2005 From: diona at studio12a.com (Diona Kidd) Date: Sat, 25 Jun 2005 08:22:59 -0400 Subject: [Charlotte.PM] catalyst article on perl.com Message-ID: <45482a4242cd750bff5fb902da67b780@studio12a.com> Hi all, I noticed this interesting article on perl.com regarding Catalyst, one of the many module groups we looked at during our last meeting. If you're interested in MVC applications (as I am), it's an interesting read. See http://www.perl.com/pub/a/2005/06/02/catalyst.html Diona From kwhitsel at gmail.com Tue Jun 28 09:25:19 2005 From: kwhitsel at gmail.com (Kurt W. Whitsel) Date: Tue, 28 Jun 2005 12:25:19 -0400 Subject: [Charlotte.PM] Perl of Wisdom column by Randal Schwartz Message-ID: <36540a840506280925499f2806@mail.gmail.com> Linux Magazines Perl of Wisdom column written by Randal Schwartz. http://www.linux-mag.com/depts/perl.html