From pjf at perltraining.com.au Sun Nov 9 22:10:31 2008 From: pjf at perltraining.com.au (Paul Fenwick) Date: Mon, 10 Nov 2008 17:10:31 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: <4917D057.8090403@perltraining.com.au> G'day everyone, I'm pleased to announce that this Wednesday is a very special end-of-year Melbourne Perl Mongers celebration! Rather than having a speaker, we have something much much better.... give-aways! We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. We've got books on firefox secrets. We've got OSDC proceedings, and we've got mystery prizes! The meeting will be held at the very special celebratory place of: THIS WEDNESDAY, 12th Nov 6:30pm Portland Hotel (Public Bar) Corner Lt Collins & Russell Sts Melbourne Website: http://www.portlandhotel.com.au/ Looking forward to seeing you there! Paul [1] Chocolates may be chronologically challenged. -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 From alec.clews at gmail.com Sun Nov 9 22:47:46 2008 From: alec.clews at gmail.com (Alec Clews) Date: Mon, 10 Nov 2008 17:47:46 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: <4917d915.6105be0a.6e96.ffffb397@mx.google.com> Fortunately the beer will not be so challenged! Alec (using toy telephone computer) -----Original Message----- From: "Paul Fenwick" To: "Melbourne Perl Mongers" Sent: 10/11/2008 17:10 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! G'day everyone, I'm pleased to announce that this Wednesday is a very special end-of-year Melbourne Perl Mongers celebration! Rather than having a speaker, we have something much much better.... give-aways! We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. We've got books on firefox secrets. We've got OSDC proceedings, and we've got mystery prizes! The meeting will be held at the very special celebratory place of: THIS WEDNESDAY, 12th Nov 6:30pm Portland Hotel (Public Bar) Corner Lt Collins & Russell Sts Melbourne Website: http://www.portlandhotel.com.au/ Looking forward to seeing you there! Paul [1] Chocolates may be chronologically challenged. -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 _______________________________________________ Melbourne-pm mailing list [truncated by sender] From alec.clews at gmail.com Tue Nov 11 14:55:34 2008 From: alec.clews at gmail.com (Alec Clews) Date: Wed, 12 Nov 2008 09:55:34 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> If you are coming tonight please RSVP so I can book a table PS beer at Portland is very good -----Original Message----- From: "Paul Fenwick" To: "Melbourne Perl Mongers" Sent: 10/11/2008 17:10 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! G'day everyone, I'm pleased to announce that this Wednesday is a very special end-of-year Melbourne Perl Mongers celebration! Rather than having a speaker, we have something much much better.... give-aways! We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. We've got books on firefox secrets. We've got OSDC proceedings, and we've got mystery prizes! The meeting will be held at the very special celebratory place of: THIS WEDNESDAY, 12th Nov 6:30pm Portland Hotel (Public Bar) Corner Lt Collins & Russell Sts Melbourne Website: http://www.portlandhotel.com.au/ Looking forward to seeing you there! Paul [1] Chocolates may be chronologically challenged. -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 _______________________________________________ Melbourne-pm mailing list [truncated by sender] From crashkat at gmail.com Tue Nov 11 14:57:26 2008 From: crashkat at gmail.com (Kat Grant) Date: Wed, 12 Nov 2008 09:57:26 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> Message-ID: <53ea12080811111457s4b8adb28oea711651bded9bd8@mail.gmail.com> I'm coming :) On Wed, Nov 12, 2008 at 9:55 AM, Alec Clews wrote: > > If you are coming tonight please RSVP so I can book a table > > PS beer at Portland is very good > -----Original Message----- > From: "Paul Fenwick" > To: "Melbourne Perl Mongers" > Sent: 10/11/2008 17:10 > Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! > > G'day everyone, > > I'm pleased to announce that this Wednesday is a very special end-of-year > Melbourne Perl Mongers celebration! Rather than having a speaker, we have > something much much better.... give-aways! > > We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. > We've got books on firefox secrets. We've got OSDC proceedings, and we've > got mystery prizes! > > The meeting will be held at the very special celebratory place of: > > THIS WEDNESDAY, 12th Nov > > 6:30pm > > Portland Hotel (Public Bar) > Corner Lt Collins & Russell Sts > Melbourne > > Website: http://www.portlandhotel.com.au/ > > Looking forward to seeing you there! > > Paul > > [1] Chocolates may be chronologically challenged. > > -- > Paul Fenwick | http://perltraining.com.au/ > Director of Training | Ph: +61 3 9354 6001 > Perl Training Australia | Fax: +61 3 9354 2681 > _______________________________________________ > Melbourne-pm mailing list [truncated by sender] > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > From hamish at hamishcarpenter.com Tue Nov 11 15:02:54 2008 From: hamish at hamishcarpenter.com (Hamish Carpenter) Date: Wed, 12 Nov 2008 10:02:54 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <53ea12080811111457s4b8adb28oea711651bded9bd8@mail.gmail.com> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> <53ea12080811111457s4b8adb28oea711651bded9bd8@mail.gmail.com> Message-ID: <2d53e4cf0811111502s3fd25719v7f83e15b870ecee0@mail.gmail.com> Count me in too From toby.corkindale at strategicdata.com.au Tue Nov 11 15:10:27 2008 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 12 Nov 2008 10:10:27 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> Message-ID: <491A10E3.3060800@strategicdata.com.au> Alec Clews wrote: > If you are coming tonight please RSVP so I can book a table Yep, I'll be there.. Toby > PS beer at Portland is very good > -----Original Message----- > From: "Paul Fenwick" > To: "Melbourne Perl Mongers" > Sent: 10/11/2008 17:10 > Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! > > G'day everyone, > > I'm pleased to announce that this Wednesday is a very special end-of-year > Melbourne Perl Mongers celebration! Rather than having a speaker, we have > something much much better.... give-aways! > > We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. > We've got books on firefox secrets. We've got OSDC proceedings, and we've > got mystery prizes! > > The meeting will be held at the very special celebratory place of: > > THIS WEDNESDAY, 12th Nov > > 6:30pm > > Portland Hotel (Public Bar) > Corner Lt Collins & Russell Sts > Melbourne > > Website: http://www.portlandhotel.com.au/ > > Looking forward to seeing you there! > > Paul > > [1] Chocolates may be chronologically challenged. > -- Strategic Data Pty Ltd Ph: 03 9340 9000 From jarich at perltraining.com.au Tue Nov 11 15:13:09 2008 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed, 12 Nov 2008 10:13:09 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> Message-ID: <491A1185.60007@perltraining.com.au> Paul and I will be there, and I'll be bringing give-aways! J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From melbourne.pm at joshheumann.com Tue Nov 11 15:12:48 2008 From: melbourne.pm at joshheumann.com (Josh Heumann) Date: Tue, 11 Nov 2008 15:12:48 -0800 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> Message-ID: <20081111231248.GA25880@joshheumann.com> > If you are coming tonight please RSVP so I can book a table I'm in. J From Stephen.Edmonds at its.monash.edu.au Tue Nov 11 15:53:22 2008 From: Stephen.Edmonds at its.monash.edu.au (Stephen Edmonds) Date: Wed, 12 Nov 2008 10:53:22 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <491A1185.60007@perltraining.com.au> References: <491a0d69.4403be0a.052a.ffffa400@mx.google.com> <491A1185.60007@perltraining.com.au> Message-ID: Count John and myself in. -- Stephen Edmonds Senior Portal Developer / Integrator Flexible Learning and Teaching Program Information Technology Services, Monash University From: Jacinta Richardson To: Alec Clews Cc: Melbourne Perl Mongers Date: 12/11/08 10:13 AM Subject: Re: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Paul and I will be there, and I'll be bringing give-aways! J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From ddick at aapt.net.au Tue Nov 11 16:07:30 2008 From: ddick at aapt.net.au (David Dick) Date: Wed, 12 Nov 2008 00:07:30 -0000 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: > If you are coming tonight please RSVP so I can book a table From ddick at aapt.net.au Tue Nov 11 16:10:12 2008 From: ddick at aapt.net.au (David Dick) Date: Wed, 12 Nov 2008 00:10:12 -0000 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: > If you are coming tonight please RSVP so I can book a table sorry, meant to say, 85% chance of being there. :) From pat at patspam.com Tue Nov 11 18:54:09 2008 From: pat at patspam.com (Patrick Donelan) Date: Wed, 12 Nov 2008 13:54:09 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: References: Message-ID: <42321ee20811111854j40cbbcacu2305050bd00090cc@mail.gmail.com> I'm coming! On Wed, Nov 12, 2008 at 11:10 AM, David Dick wrote: > > If you are coming tonight please RSVP so I can book a table > > sorry, meant to say, 85% chance of being there. :) > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From crshort at gmail.com Tue Nov 11 22:11:15 2008 From: crshort at gmail.com (Christopher Short) Date: Wed, 12 Nov 2008 17:11:15 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: <42321ee20811111854j40cbbcacu2305050bd00090cc@mail.gmail.com> References: <42321ee20811111854j40cbbcacu2305050bd00090cc@mail.gmail.com> Message-ID: Oh RSVP by when? I'm coming 2008/11/12 Patrick Donelan : > I'm coming! > > On Wed, Nov 12, 2008 at 11:10 AM, David Dick wrote: >> >> > If you are coming tonight please RSVP so I can book a table >> >> sorry, meant to say, 85% chance of being there. :) >> _______________________________________________ >> Melbourne-pm mailing list >> Melbourne-pm at pm.org >> http://mail.pm.org/mailman/listinfo/melbourne-pm > > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > From alec.clews at gmail.com Tue Nov 11 22:19:28 2008 From: alec.clews at gmail.com (Alec Clews) Date: Wed, 12 Nov 2008 17:19:28 +1100 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! Message-ID: <491a7574.0405be0a.6c0c.324b@mx.google.com> Perl Mongers have reserved tables from 18:30 in the Brewhouse. Call me on 0425-770-886 in case of difficulty Alec -----Original Message----- From: "Paul Fenwick" To: "Melbourne Perl Mongers" Sent: 10/11/2008 17:10 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! G'day everyone, I'm pleased to announce that this Wednesday is a very special end-of-year Melbourne Perl Mongers celebration! Rather than having a speaker, we have something much much better.... give-aways! We have OSDC T-shirts from 2004 and 2005, we've got OSDC chocolates[1]. We've got books on firefox secrets. We've got OSDC proceedings, and we've got mystery prizes! The meeting will be held at the very special celebratory place of: THIS WEDNESDAY, 12th Nov 6:30pm Portland Hotel (Public Bar) Corner Lt Collins & Russell Sts Melbourne Website: http://www.portlandhotel.com.au/ Looking forward to seeing you there! Paul [1] Chocolates may be chronologically challenged. -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 _______________________________________________ Melbourne-pm mailing list [truncated by sender] From myfwhite at gmail.com Tue Nov 11 22:20:38 2008 From: myfwhite at gmail.com (Myf White) Date: Wed, 12 Nov 2008 16:20:38 +1000 Subject: [Melbourne-pm] THIS WEDNESDAY, 12th Nov, Perl Mongers End-of-year awesomeness! In-Reply-To: References: <42321ee20811111854j40cbbcacu2305050bd00090cc@mail.gmail.com> Message-ID: <14bb7600811112220x596b2484k2aef346ec875613d@mail.gmail.com> I'm coming Myf White mailto:myfwhite at gmail.com Work like you don't need the money. Love like you've never been hurt. Dance like nobody's watching. ~ Satchel Paige -------------- next part -------------- An HTML attachment was scrubbed... URL: From melbourne.pm at joshheumann.com Thu Nov 13 02:44:44 2008 From: melbourne.pm at joshheumann.com (Josh Heumann) Date: Thu, 13 Nov 2008 02:44:44 -0800 Subject: [Melbourne-pm] New Testing Module Message-ID: <20081113104444.GA10492@joshheumann.com> At last night's meeting, I was reminded to post about a new module I wrote: Test::UniqueTestNames. http://search.cpan.org/dist/Test-UniqueTestNames/lib/Test/UniqueTestNames.pm It's a simple little module. It just runs an extra test at the end that makes sure that all of your test names were unique. It behaves just like Test::NoWarnings, adding one to the total number of tests that you ran, and gives some nifty diagnostics at the end if you had tests with duplicate names. Why is this useful? Well, say you have some test in a loop: for( 0..9 ) { is( always_return_13( $_ ), 13, 'returned 13' ); } ...and one of them breaks. Just one. How do you know? It's much easier to debug if it looks like this: for( 0..9 ) { is( always_return_13( $_ ), 13, "passing in $_ returned 13" ); } For some of you, this is already common practice, but if you're working with a lot of people who might not always give their tests unique names, it's handy. And it's on a cpan mirror near you. J From alec.clews at gmail.com Mon Nov 17 01:30:00 2008 From: alec.clews at gmail.com (Alec Clews) Date: Mon, 17 Nov 2008 20:30:00 +1100 Subject: [Melbourne-pm] How to create data structures with 'default values' Message-ID: <1226914201.7947.1.camel@k10> G'Day Perl Bunnies, I have created a hash structure with a set of environment specific keys and values. * There is a different hash for each of the environments. * Many of the values are the same (default) across all the environments. What is the easy way of setting up the defaults once and then have each environment overwrite the default values with specific settings? Currently I have a hash of defaults. However it's a pain to define each specific value or assign the default value for every single key in every single environment. Thanks. - ?Alec Clews Principal Consultant Jabber: alecclews at jabber.org.au Voga Consulting Services skype: alecclews Voice: +61(425)770-886 http://www.voga.com.au/ blog:http://alecthegeek.wordpress.com/ Melbourne, Australia -- ?Alec Clews Personal Melbourne, Australia. Jabber: alecclews at jabber.org.au PGPKey ID: 0x9BBBFC7C Blog http://alecthegeek.wordpress.com/ From shlomif at iglu.org.il Mon Nov 17 01:40:34 2008 From: shlomif at iglu.org.il (Shlomi Fish) Date: Mon, 17 Nov 2008 11:40:34 +0200 Subject: [Melbourne-pm] How to create data structures with 'default values' In-Reply-To: <1226914201.7947.1.camel@k10> References: <1226914201.7947.1.camel@k10> Message-ID: <200811171140.34463.shlomif@iglu.org.il> On Monday 17 November 2008, Alec Clews wrote: > G'Day Perl Bunnies, > > I have created a hash structure with a set of environment specific keys > and values. > > * There is a different hash for each of the environments. > > * Many of the values are the same (default) across all the > environments. > > What is the easy way of setting up the defaults once and then have each > environment overwrite the default values with specific settings? > > Currently I have a hash of defaults. However it's a pain to define each > specific value or assign the default value for every single key in every > single environment. > Can you do something like: {{{ my %total_hash = (%default_hash, %unique_hash); }}} Note that it won't merge keys - just over-write them. Regards, Shlomi Fish > Thanks. > > > - > ?Alec Clews Principal Consultant > Jabber: alecclews at jabber.org.au Voga Consulting Services > skype: alecclews Voice: +61(425)770-886 http://www.voga.com.au/ > blog:http://alecthegeek.wordpress.com/ Melbourne, Australia -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Funny Anti-Terrorism Story - http://xrl.us/bjn7t Shlomi, so what are you working on? Working on a new wiki about unit testing fortunes in freecell? -- Ran Eilam From ickphum at gmail.com Mon Nov 17 03:43:46 2008 From: ickphum at gmail.com (Ian Macdonald) Date: Mon, 17 Nov 2008 22:43:46 +1100 Subject: [Melbourne-pm] How to create data structures with 'default values' In-Reply-To: <1226914201.7947.1.camel@k10> References: <1226914201.7947.1.camel@k10> Message-ID: <38d47d520811170343r12d0a286u82e728b280563d23@mail.gmail.com> I'm a fan of sucking that kind of default config out of a YAML file. On Mon, Nov 17, 2008 at 8:30 PM, Alec Clews wrote: > G'Day Perl Bunnies, > > I have created a hash structure with a set of environment specific keys > and values. > > * There is a different hash for each of the environments. > > * Many of the values are the same (default) across all the > environments. > > What is the easy way of setting up the defaults once and then have each > environment overwrite the default values with specific settings? > > Currently I have a hash of defaults. However it's a pain to define each > specific value or assign the default value for every single key in every > single environment. > > Thanks. > > > - > ?Alec Clews Principal Consultant > Jabber: alecclews at jabber.org.au Voga Consulting Services > skype: alecclews Voice: +61(425)770-886 http://www.voga.com.au/ > blog:http://alecthegeek.wordpress.com/ Melbourne, Australia > > > > -- > ?Alec Clews > Personal Melbourne, Australia. > Jabber: alecclews at jabber.org.au PGPKey ID: 0x9BBBFC7C > Blog http://alecthegeek.wordpress.com/ > > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm -- Ian Macdonald -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Mon Nov 17 15:35:03 2008 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 18 Nov 2008 10:35:03 +1100 Subject: [Melbourne-pm] How to create data structures with 'default values' In-Reply-To: <1226914201.7947.1.camel@k10> References: <1226914201.7947.1.camel@k10> Message-ID: <4921FFA7.5030403@strategicdata.com.au> Alec Clews wrote: > G'Day Perl Bunnies, > > I have created a hash structure with a set of environment specific keys > and values. > > * There is a different hash for each of the environments. > > * Many of the values are the same (default) across all the > environments. > > What is the easy way of setting up the defaults once and then have each > environment overwrite the default values with specific settings? > > Currently I have a hash of defaults. However it's a pain to define each > specific value or assign the default value for every single key in every > single environment. Is this overkill? package Your::Configuration; sub colour { 'black' } sub volume { 11 } sub new { bless $_[0]; } 1; package Your::Configuration::Win32; use parent 'Your::Configuration'; sub colour { 'blue' } 1; package Your::Configuration::MacOS; use parent 'Your::Configuration'; sub colour { 'white' } 1; package main; use Your::Configuration::MacOS; # For bonus marks, use a factory class instead. my $config = Your::Configuration::MacOS->new; say "Volume is turned up to: " . $config->volume; As another poster already mentioned - try YAML. It supports defaults and overrides, at least in the later versions. -- Strategic Data Pty Ltd Ph: 03 9340 9000 From wayland at wayland.id.au Mon Nov 17 19:08:39 2008 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Tue, 18 Nov 2008 14:08:39 +1100 (EST) Subject: [Melbourne-pm] How to create data structures with 'default values' In-Reply-To: <1226914201.7947.1.camel@k10> References: <1226914201.7947.1.camel@k10> Message-ID: On Mon, 17 Nov 2008, Alec Clews wrote: > G'Day Perl Bunnies, > > I have created a hash structure with a set of environment specific keys > and values. > > * There is a different hash for each of the environments. > > * Many of the values are the same (default) across all the > environments. > > What is the easy way of setting up the defaults once and then have each > environment overwrite the default values with specific settings? > > Currently I have a hash of defaults. However it's a pain to define each > specific value or assign the default value for every single key in every > single environment. Is this the sort of thing you were thinking of? ------------------------------------------------------------ #!/usr/bin/perl use Data::Dumper; %defaults = ( key1 => "value1", key2 => "value2", key3 => "value3", ); $specifics = { key2 => "value4", }; %keyhash = map { $_ => 1 } keys %defaults, keys %$specifics; %actual = map { $_ => exists($specifics->{$_}) ? $specifics->{$_} : $defaults{$_} } keys %keyhash; print Dumper \%keyhash, \%actual; ------------------------------------------------------------ I've made %defaults a hash and $specifics a hash reference, but that was just to demonstrate more things. --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From alec.clews at gmail.com Tue Nov 18 02:08:19 2008 From: alec.clews at gmail.com (Alec Clews) Date: Tue, 18 Nov 2008 21:08:19 +1100 Subject: [Melbourne-pm] How to create data structures with 'default values' In-Reply-To: <1226914201.7947.1.camel@k10> References: <1226914201.7947.1.camel@k10> Message-ID: <1227002899.7947.77.camel@k10> Many thanks for the replies. I decided in the end to adopt Shlomi's suggestions as it fitted my current data structures and provided the ability to have extra levels of defaults. Here is the sample implementation #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %globalDefaults = ( key1 => 'defValue1', key2 => 'defValue2', key3 => 'defValue3', ); my %localDefaults = ( key2 => 'localValue2', key3 => 'localValue3', ); my @envSettings = ( # Array -- settings for each config file { file_in => "myTemplateFile", file_out => "outputFile", #templateValues => {}, #Filled in later templateSettings => { key3 => "fileValue3", key4 => "fileValue4", } }, { file_in => "myTemplateFile2", file_out => "outputFile2", #templateValues => {}, #Filled in later templateSettings => { key3 => "2fileValue3", key4 => "2fileValue4", } }, ); foreach my $fileTemplateSettings (@envSettings) { %{ $fileTemplateSettings->{'templateValues'} } = ( %globalDefaults, %localDefaults, %{ $fileTemplateSettings->{'templateSettings'} } ); } foreach my $fileTemplateSettings (@envSettings) { print Dumper %{ $fileTemplateSettings->{'templateValues'} }; print "\n"; } - ?Alec Clews Personal Melbourne, Australia. Jabber: alecclews at jabber.org.au PGPKey ID: 0x9BBBFC7C Blog http://alecthegeek.wordpress.com/ On Mon, 2008-11-17 at 20:30 +1100, Alec Clews wrote: > G'Day Perl Bunnies, > > I have created a hash structure with a set of environment specific keys > and values. > > * There is a different hash for each of the environments. > > * Many of the values are the same (default) across all the > environments. > > What is the easy way of setting up the defaults once and then have each > environment overwrite the default values with specific settings? > > Currently I have a hash of defaults. However it's a pain to define each > specific value or assign the default value for every single key in every > single environment. > > Thanks. > > > - > ?Alec Clews Principal Consultant > Jabber: alecclews at jabber.org.au Voga Consulting Services > skype: alecclews Voice: +61(425)770-886 http://www.voga.com.au/ > blog:http://alecthegeek.wordpress.com/ Melbourne, Australia > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: From tjc at wintrmute.net Tue Nov 18 22:54:59 2008 From: tjc at wintrmute.net (Toby Wintermute) Date: Wed, 19 Nov 2008 17:54:59 +1100 Subject: [Melbourne-pm] [OT] The monopod Message-ID: No, it's not the prequel to the ipod. Sorry about the off-topic post, but at the last Perlmongers meet in the pub, I was chatting to someone about camera gear, and we discussed monopods. If you're still interested in borrowing/buying the one I mentioned having, please get in touch :) (Or anyone else for that matter- it's a hefty monopod, and there's a D200 body and grip going too) Cheers! Toby From wayland at wayland.id.au Wed Nov 19 15:28:04 2008 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Thu, 20 Nov 2008 10:28:04 +1100 (EST) Subject: [Melbourne-pm] [OT] The monopod In-Reply-To: References: Message-ID: On Wed, 19 Nov 2008, Toby Wintermute wrote: > No, it's not the prequel to the ipod. ...it's a single-footed dwarf from the book "The Voyage of the Dawn Treader", by C. S. Lewis :). [/mono/, meaning "one", and /pod/, meaning foot]. Incidentally, it appears that the Parrot Virtual Machine (which Perl6 is to be built on top of) will reach version 1.0 in March 2009. :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From andrew.stuart at flatraterecruitment.com.au Thu Nov 20 14:15:09 2008 From: andrew.stuart at flatraterecruitment.com.au (Andrew Stuart) Date: Fri, 21 Nov 2008 09:15:09 +1100 Subject: [Melbourne-pm] Perl C C++ low level network/systems development Message-ID: <738B9191-5301-4DE9-A240-08C44454F792@flatraterecruitment.com.au> Hi folks, We're looking for developers with Perl, C and C++ experience to work on the development of a sophisticated low level networking product. The right person for the job is comfortable operating at a bits and bytes and network protocol level. This is a back end role doing systems development. This is a greenfields project developing a new product from scratch. It's a small and growing team. Environment is Linux. Years of experience is less important than desire to do the work. Experience with specific technologies is less important than willingness to learn. When emailing the Perlmongers do I need to state the obvious such as "We're looking for people who love to code."? Probably not, after all this is a not a Java users group. CBD location. Andrew Stuart Apply now info at flatraterecruitment.com.au Telephone enquiries should go to Flat Rate Recruitment (03) 9696 1616 www.flatraterecruitment.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: From lsharpe at pacificwireless.com.au Thu Nov 20 18:42:56 2008 From: lsharpe at pacificwireless.com.au (Leigh Sharpe) Date: Fri, 21 Nov 2008 13:42:56 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? Message-ID: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> Hi All, Can anybody give me an idea of just how much impact using $& can have on a program? I have a function which does something like this: foreach my $this_line(@an_array) { next if ($this_line=~m/something which indicates we're not interested/); if ($this_line =~m/something we are interested in \d*\.*\d*) { my $foo=$&; # Do some stuff with $foo } elsif ($this_line=~m/something else interesting \d*\.*\d*/) { my $bar=$&; # Do something with $bar } } @an_array could be anything up to about 50 elements. This is the only place in the whole program which uses a regex, so the impact on other parts of the program should be nil. I just don't know if it's going to be worth removing those references to $&, and how much it will benefit the running of the program. Obviously, the bigger @an_array is, the larger the impact, but I can safely say it won't be much bigger than about 50. So, are we talking an order of magnitude slower? More? Less? Anybody even want to take an educated guess? Regards, Leigh Leigh Sharpe Network Systems Engineer Pacific Wireless Ph +61 3 9584 8966 Mob 0408 009 502 Helpdesk 1300 300 616 email lsharpe at pacificwireless.com.au web www.pacificwireless.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfiejohn at gmail.com Thu Nov 20 19:25:19 2008 From: alfiejohn at gmail.com (Alfie John) Date: Fri, 21 Nov 2008 14:25:19 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? In-Reply-To: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> References: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> Message-ID: >From perlre: WARNING: Once Perl sees that you need one of $&, $', or $' anywhere in the program, it has to provide them for every pattern match. This may substantially slow your program. This is the only place in the whole program which uses a regex, so the > impact on other parts of the program should be nil. > I just don't know if it's going to be worth removing those references to > $&, and how much it will benefit the running of the program. > Obviously, the bigger @an_array is, the larger the impact, but I can safely > say it won't be much bigger than about 50. > So, are we talking an order of magnitude slower? More? Less? Anybody even > want to take an educated guess? > In other words, having it only in the above code will still impact *all other* regexes in any code, including all imported modules. Alfie -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Thu Nov 20 19:31:38 2008 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 21 Nov 2008 14:31:38 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? In-Reply-To: References: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> Message-ID: <49262B9A.3050709@strategicdata.com.au> Alfie John wrote: > From perlre: > > WARNING: Once Perl sees that you need one of $&, $', or $' anywhere in > the program, it has to provide them for every pattern match. > This may > substantially slow your program. > > This is the only place in the whole program which uses a regex, so > the impact on other parts of the program should be nil. > I just don't know if it's going to be worth removing those > references to $&, and how much it will benefit the running of the > program. > Obviously, the bigger @an_array is, the larger the impact, but I can > safely say it won't be much bigger than about 50. > So, are we talking an order of magnitude slower? More? Less? Anybody > even want to take an educated guess? > > > In other words, having it only in the above code will still impact *all > other* regexes in any code, including all imported modules. Do you have to use $&, or can you use ${^MATCH} instead? (Which doesn't come with the global performance impact) Toby -- Strategic Data Pty Ltd Ph: 03 9340 9000 From alfiejohn at gmail.com Thu Nov 20 19:42:58 2008 From: alfiejohn at gmail.com (Alfie John) Date: Fri, 21 Nov 2008 14:42:58 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? In-Reply-To: <49262B9A.3050709@strategicdata.com.au> References: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> <49262B9A.3050709@strategicdata.com.au> Message-ID: Hey Toby, > Do you have to use $&, or can you use ${^MATCH} instead? (Which doesn't > come with the global performance impact) Where does ${^MATCH} come from? I hope you're not talking about $MATCH, which is just english for $&. If it is, you'll still get the huge performance hit. Alfie -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Thu Nov 20 19:45:59 2008 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 21 Nov 2008 14:45:59 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? In-Reply-To: References: <96CF49BD8B56384395D698BA99007FA347A211@exchange.pacwire.local> <49262B9A.3050709@strategicdata.com.au> Message-ID: <49262EF7.7000501@strategicdata.com.au> Alfie John wrote: > Hey Toby, > > Do you have to use $&, or can you use ${^MATCH} instead? (Which > doesn't come with the global performance impact) > > > Where does ${^MATCH} come from? I hope you're not talking about $MATCH, > which is just english for $&. If it is, you'll still get the huge > performance hit. Nope, definitely ${^MATCH}. Full text from `perldoc perlre`: WARNING: Once Perl sees that you need one of $&, "$`", or "$'" anywhere in the program, it has to provide them for every pattern match. This may substantially slow your program. Perl uses the same mechanism to produce $1, $2, etc, so you also pay a price for each pattern that contains capturing parentheses. (To avoid this cost while retaining the grouping behaviour, use the extended regular expression "(?: ... )" instead.) But if you never use $&, "$`" or "$'", then patterns without capturing parentheses will not be penalized. So avoid $&, "$'", and "$`" if you can, but if you can?t (and some algorithms really appreciate them), once you?ve used them once, use them at will, because you?ve already paid the price. As of 5.005, $& is not so costly as the other two. As a workaround for this problem, Perl 5.10.0 introduces "${^PREMATCH}", "${^MATCH}" and "${^POSTMATCH}", which are equivalent to "$`", $& and "$'", except that they are only guaranteed to be defined after a successful match that was executed with the "/p" (preserve) modifier. The use of these variables incurs no global performance penalty, unlike their punctuation char equivalents, however at the trade-off that you have to tell perl when you want to use them. -Toby -- Strategic Data Pty Ltd Ph: 03 9340 9000 From benjamin.j.hayes at exxonmobil.com Thu Nov 20 19:57:27 2008 From: benjamin.j.hayes at exxonmobil.com (benjamin.j.hayes at exxonmobil.com) Date: Fri, 21 Nov 2008 13:57:27 +1000 Subject: [Melbourne-pm] Fw: Just how much does $& slow things down? Message-ID: You could try DProf. It will give you a breakdown of where time is spent in your program. It may not give you the level of detail you need in this case as it gives you statistics at the subroutine level, but it might be enlightening nonetheless, particularly if you use it to compare different ways of doing things (ie compare your script using $& with a version using ${^MATCH}). There's a useful article here: http://www.perl.com/pub/a/2004/06/25/profiling.html Regards Ben Hayes Onsite Application Support Coordinator ExxonMobil Technical Computing Company / Upstream IT Upstream Technical Computing / UTC Applications / Application & Data Integration Esso Australia Pty Ltd Room 5.59, 12 Riverside Quay, Southbank, VIC 3006, Australia Phone: +61-3-9270-3538?Fax: +61-3-9270-3600? E-mail: benjamin.j.hayes at exxonmobil.com ----- Forwarded by Benjamin J Hayes/U-SouthPacific/ExxonMobil on 21/11/2008 02:52 PM ----- Toby Corkindale ta.com.au> cc Sent by: melbourne-pm at pm.org melbourne-pm-b Subject ounces+benjami Re: [Melbourne-pm] Just how much n.j.hayes=exxo does $& slow things down? nmobil.com at pm. org 21/11/2008 02:45 PM Alfie John wrote: > Hey Toby, > > Do you have to use $&, or can you use ${^MATCH} instead? (Which > doesn't come with the global performance impact) > > > Where does ${^MATCH} come from? I hope you're not talking about $MATCH, > which is just english for $&. If it is, you'll still get the huge > performance hit. Nope, definitely ${^MATCH}. Full text from `perldoc perlre`: WARNING: Once Perl sees that you need one of $&, "$`", or "$'" anywhere in the program, it has to provide them for every pattern match. This may substantially slow your program. Perl uses the same mechanism to produce $1, $2, etc, so you also pay a price for each pattern that contains capturing parentheses. (To avoid this cost while retaining the grouping behaviour, use the extended regular expression "(?: ... )" instead.) But if you never use $&, "$`" or "$'", then patterns without capturing parentheses will not be penalized. So avoid $&, "$'", and "$`" if you can, but if you can?t (and some algorithms really appreciate them), once you?ve used them once, use them at will, because you?ve already paid the price. As of 5.005, $& is not so costly as the other two. As a workaround for this problem, Perl 5.10.0 introduces "${^PREMATCH}", "${^MATCH}" and "${^POSTMATCH}", which are equivalent to "$`", $& and "$'", except that they are only guaranteed to be defined after a successful match that was executed with the "/p" (preserve) modifier. The use of these variables incurs no global performance penalty, unlike their punctuation char equivalents, however at the trade-off that you have to tell perl when you want to use them. -Toby -- Strategic Data Pty Ltd Ph: 03 9340 9000 _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm From lsharpe at pacificwireless.com.au Thu Nov 20 19:59:35 2008 From: lsharpe at pacificwireless.com.au (Leigh Sharpe) Date: Fri, 21 Nov 2008 14:59:35 +1100 Subject: [Melbourne-pm] Just how much does $& slow things down? Message-ID: <96CF49BD8B56384395D698BA99007FA347A213@exchange.pacwire.local> > Do you have to use $&, or can you use ${^MATCH} instead? (Which doesn't > come with the global performance impact) Actually, no. In this case, it's actually quite easy to put paranthesis in the regex and then use $1, $2 etc. Looks like it saves around 0.1 seconds per iteration, which makes me wonder if it was worth bothering with. ${^MATCH} isn't much use to me in this case either, I'm using 5.8. From matt.koscica at gmail.com Thu Nov 20 20:56:08 2008 From: matt.koscica at gmail.com (Matt Koscica) Date: Fri, 21 Nov 2008 15:56:08 +1100 Subject: [Melbourne-pm] Fw: Just how much does $& slow things down? In-Reply-To: References: Message-ID: Not to seem contradictory, but Devel::NYTProf is a much better choice - DProf should've been deprecated about 10 years ago. See Tim Bunce's blog or OSCON talk for some more info: http://blog.timbunce.org/2008/07/12/devel-dprof-broken-by-the-passage-of-time/ http://blip.tv/file/1130150 On Fri, Nov 21, 2008 at 2:57 PM, wrote: > > You could try DProf. It will give you a breakdown of where time is spent in > your program. It may not give you the level of detail you need in this case > as it gives you statistics at the subroutine level, but it might be > enlightening nonetheless, particularly if you use it to compare different > ways of doing things (ie compare your script using $& with a version using > ${^MATCH}). There's a useful article here: > http://www.perl.com/pub/a/2004/06/25/profiling.html > > Regards > > Ben Hayes > Onsite Application Support Coordinator > ExxonMobil Technical Computing Company / Upstream IT > Upstream Technical Computing / UTC Applications / Application & Data > Integration > Esso Australia Pty Ltd > Room 5.59, 12 Riverside Quay, Southbank, VIC 3006, Australia > Phone: +61-3-9270-3538 Fax: +61-3-9270-3600 E-mail: > benjamin.j.hayes at exxonmobil.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdthornton at ozemail.com.au Mon Nov 24 20:05:33 2008 From: jdthornton at ozemail.com.au (ajthornton) Date: Tue, 25 Nov 2008 15:05:33 +1100 Subject: [Melbourne-pm] internet filtering issues In-Reply-To: References: Message-ID: Hello People on this list may be aware of the government's plans for a mandatory internet filter. As someone who is organizing the protests against this plan, I am looking for anyone suitably qualified to speak for about 20 minutes on why the filter will not work. Thus, if the intrusion is excused, I wonder if there is anyone on this mailing list who could do so. All that I ask is a description of the technical aspects - proxies, tunnels etc - and why a filter will not work for those reasons. No political comment is asked for; other speakers will deal with the politics. The protest will be nationwide in Melbourne, Sydney, Brisbane, Adelaide and Hobart on Saturday December 13. In Melbourne it's 12 -4 at the State Library. For other times and locations please click on the ink below. Anyone who is interested can reply on this list, reply to me individually on this list, or go to www.nocleanfeed.com and post. Of course if you want to spend the 20 minutes talking about how Perl scripts will get around the filter then you are more than welcome to!! Yours sincerely John Thornton -------------- next part -------------- An HTML attachment was scrubbed... URL: From melbourne-pm at mjch.net Wed Nov 26 16:46:41 2008 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Thu, 27 Nov 2008 11:46:41 +1100 Subject: [Melbourne-pm] HTTP server-like module? Message-ID: <1227746801.8565.1286984437@webmail.messagingengine.com> I'm looking for a module that will take a file or socket handle, read the client request and header and turn that into an appropriate object for me ... I've already got code handling the socket and forking issues, so I definately don't need something that implements a whole HTTP server for me, just the bit that does the request parsing ... most of the HTTP modules out there seem to be from the point of view of a client which isn't what I'm after ... I had a look through the module list, but nothing really seemed to be appropriate ... has anyone used something like this before? It doesn't seem a particularly hard thing to implement, I've just got enough wheels I've rebuilt recently and would rather not add to my set, if you know what I mean ... Regards, Malcolm -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From matt.koscica at gmail.com Wed Nov 26 17:51:41 2008 From: matt.koscica at gmail.com (Matt Koscica) Date: Thu, 27 Nov 2008 12:51:41 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: <1227746801.8565.1286984437@webmail.messagingengine.com> References: <1227746801.8565.1286984437@webmail.messagingengine.com> Message-ID: SRI's new Mojo framework might have the bits you need: http://mojolicious.org/ On Thu, Nov 27, 2008 at 11:46 AM, Malcolm Herbert wrote: > I'm looking for a module that will take a file or socket handle, read > the client request and header and turn that into an appropriate object > for me ... > > I've already got code handling the socket and forking issues, so I > definately don't need something that implements a whole HTTP server for > me, just the bit that does the request parsing ... most of the HTTP > modules out there seem to be from the point of view of a client which > isn't what I'm after ... > > I had a look through the module list, but nothing really seemed to be > appropriate ... has anyone used something like this before? It doesn't > seem a particularly hard thing to implement, I've just got enough wheels > I've rebuilt recently and would rather not add to my set, if you know > what I mean ... > > Regards, > Malcolm > > -- > Malcolm Herbert This brain intentionally > mjch at mjch.net left blank > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From melbourne-pm at mjch.net Wed Nov 26 18:32:27 2008 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Thu, 27 Nov 2008 13:32:27 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: References: <1227746801.8565.1286984437@webmail.messagingengine.com> Message-ID: <1227753147.26733.1286994719@webmail.messagingengine.com> $!@#$#@!@#@#!@!@# ... damnit, there's some really useful stuff in there I could have used a few months back ... thanks, that looks like a great set of modules ... :) *happy thoughts* ... *happy thoughts* -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From steve at sabljak.org Wed Nov 26 18:40:12 2008 From: steve at sabljak.org (Steve Sabljak) Date: Thu, 27 Nov 2008 13:40:12 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: <1227753147.26733.1286994719@webmail.messagingengine.com> References: <1227746801.8565.1286984437@webmail.messagingengine.com> <1227753147.26733.1286994719@webmail.messagingengine.com> Message-ID: <81c28d920811261840k65bccdbfy946a85bdde1eb780@mail.gmail.com> On Thu, Nov 27, 2008 at 1:32 PM, Malcolm Herbert wrote: > $!@#$#@!@#@#!@!@# ... damnit, there's some really useful stuff in there > I could have used a few months back ... > > thanks, that looks like a great set of modules ... :) > > *happy thoughts* ... *happy thoughts* > > -- > Malcolm Herbert This brain intentionally > mjch at mjch.net left blank > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > Would HTTP::Request & HTTP::Response from libwww-perl not do the trick? cheers, Steve From melbourne-pm at mjch.net Wed Nov 26 18:47:03 2008 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Thu, 27 Nov 2008 13:47:03 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: <81c28d920811261840k65bccdbfy946a85bdde1eb780@mail.gmail.com> References: <1227746801.8565.1286984437@webmail.messagingengine.com> <1227753147.26733.1286994719@webmail.messagingengine.com> <81c28d920811261840k65bccdbfy946a85bdde1eb780@mail.gmail.com> Message-ID: <1227754023.29143.1286996167@webmail.messagingengine.com> On Thu, 27 Nov 2008 13:40:12 +1100, "Steve Sabljak" said: > Would HTTP::Request & HTTP::Response from libwww-perl not do the trick? >From my understandong of it, these are for handing data around between objects but don't to any parsing themselves ... -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From brendon.oliver at gmail.com Wed Nov 26 18:51:50 2008 From: brendon.oliver at gmail.com (Brendon Oliver) Date: Thu, 27 Nov 2008 13:51:50 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: <1227746801.8565.1286984437@webmail.messagingengine.com> References: <1227746801.8565.1286984437@webmail.messagingengine.com> Message-ID: <200811271351.50440.brendon.oliver@gmail.com> On Thu, 27 Nov 2008 11:46:41 am Malcolm Herbert wrote: > I've already got code handling the socket and forking issues, so I > definately don't need something that implements a whole HTTP server for > me, just the bit that does the request parsing ... most of the HTTP > modules out there seem to be from the point of view of a client which > isn't what I'm after ... I know you said you've already done some ground work on this, but would HTTP::Proxy be a better approach? cheers, - Brendon -- 13:50:45 up 32 days, 15:48, 2 users, load average: 0.07, 0.20, 0.49 From toby.corkindale at strategicdata.com.au Wed Nov 26 19:12:30 2008 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Thu, 27 Nov 2008 14:12:30 +1100 Subject: [Melbourne-pm] HTTP server-like module? In-Reply-To: <1227754023.29143.1286996167@webmail.messagingengine.com> References: <1227746801.8565.1286984437@webmail.messagingengine.com> <1227753147.26733.1286994719@webmail.messagingengine.com> <81c28d920811261840k65bccdbfy946a85bdde1eb780@mail.gmail.com> <1227754023.29143.1286996167@webmail.messagingengine.com> Message-ID: <492E101E.9090605@strategicdata.com.au> Malcolm Herbert wrote: > On Thu, 27 Nov 2008 13:40:12 +1100, "Steve Sabljak" > said: >> Would HTTP::Request & HTTP::Response from libwww-perl not do the trick? > >>From my understandong of it, these are for handing data around between > objects but don't to any parsing themselves ... use IO::Socket::INET; use HTTP::Request; my $sock = IO::Socket::INET->new(LocalPort => 'http'); # etc my $bytes = $sock->read(.....); my $request = HTTP::Request->parse($bytes); my $user_agent = $request->headers->('UserAgent'); tjc -- Strategic Data Pty Ltd Ph: 03 9340 9000 From melbourne-pm at mjch.net Wed Nov 26 20:43:11 2008 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Thu, 27 Nov 2008 15:43:11 +1100 Subject: [Melbourne-pm] HTTP server-like module? Message-ID: <1227760991.15841.1287006869@webmail.messagingengine.com> On Thu, 27 Nov 2008 14:12:30 +1100, "Toby Corkindale" said: > > From my understandong of it, these are for handing data around between > > objects but don't to any parsing themselves ... > > use IO::Socket::INET; > use HTTP::Request; > > my $sock = IO::Socket::INET->new(LocalPort => 'http'); > # etc > my $bytes = $sock->read(.....); > > my $request = HTTP::Request->parse($bytes); > my $user_agent = $request->headers->('UserAgent'); huh ... well, colour me interesting shades of embarrassment ... for some reason I had assumed it didn't handle the GET/POST line which is what I wanted ... carry on all, I obviously don't know what I'm talking about ... :) -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank