From rdice at pobox.com Tue Jun 3 14:16:15 2008 From: rdice at pobox.com (Richard Dice) Date: Tue, 3 Jun 2008 17:16:15 -0400 Subject: [tpm] Damian Conway to speak in Toronto Wednesday July 16th (evening); talk and venue details here In-Reply-To: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> References: <5bef4baf0806020916l3b669e69kdc8b6e3a7231356d@mail.gmail.com> Message-ID: <5bef4baf0806031416y7b2a4d13t1fe97a35698e173@mail.gmail.com> (hi - resend due to concern over success of previous sending) ---------- Forwarded message ---------- From: Richard Dice Date: Mon, Jun 2, 2008 at 12:16 PM Subject: Damian Conway to speak in Toronto Wednesday July 16th (evening); talk and venue details here To: Toronto Perl Mongers Hi everyone, Save the date! The evening of Wed 16 July 2008, Damian Conway, Perl expert extraordinaire, Open Source luminary, and long-time friend of the Toronto Perl Mongers, will deliver -- free and to the public -- one of his signature tour-de-force completely insane talks that is 1/3 high-end IT, 1/3 showmanship and 1/3 peyote-fuelled hallucination. Here are the details: Talk: "Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces... Made Easy" This will be the world premiere of the talk. Date: Wednesday 16 July 2008 Time: 6:30pm - 9pm Location: Bahen Centre for Information Technology, University of Toronto 40 St. George Street (w. side of street, just north of College Ave. Room # BA 1160 http://maps.google.com/maps?f=q&hl=en&geocode=&q=+40+St.+George+Street,+Toronto&sll=37.0625,-95.677068&sspn=37.052328,95.009766&ie=UTF8&ll=43.659986,-79.396745&spn=0.004137,0.011598&z=17&iwloc=addr As I have done the past 4 times Damian has come to Toronto to give talks I will take up a collection. This is to help defray expenses and to provide Damian with an honorarium for the talk. Donations are completely voluntary. If you feel motivated and/or in the right place financially to make a donation please get in touch with me or visit the Paypal links at http://hew.ca/. The Toronto Perl Mongers and the other groups who have attended Damian's talks have always been incredibly generous in supporting Damian whenever he has visited in the past and both he and I thank everyone for all the support he has received over the years. Cheers, - Richard PS For those of you who don't know Damian, here is some background info on him. He's _not_ just a Perl hacker. If you're into IT in any way, shape or form prepare to have your mind blown... http://en.wikipedia.org/wiki/Damian_Conway http://damian.conway.org/About_us//Bio_formal.html http://www.googlism.com/index.htm?ism=damian+conway&type=1 -- I like the "... is my personal savior" one http://en.oreilly.com/oscon2008/public/schedule/speaker/4710 -- we are getting his OSCON 2008 keynote delivered here first! http://itc.conversationsnetwork.org/shows/detail880.html -- to hear one of his previous OSCON keynote talks (although this talk, as is the case with all his talks, is really enhanced by the slideshow that goes along with it) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080603/23e46e0b/attachment.html From nishi2k at yahoo.com Wed Jun 4 19:46:57 2008 From: nishi2k at yahoo.com (Nishat Ahmad) Date: Wed, 4 Jun 2008 19:46:57 -0700 (PDT) Subject: [tpm] Help on creating PERL APIs Message-ID: <274400.53170.qm@web36906.mail.mud.yahoo.com> Hello! I am looking for?help in creating Perl APIs. I?have a tool written in Perl and want to communicate with other systems (not in Perl) using APIs. Could you point me to some good tutorials which will guide?me how to create Perl APIs quickly. Any help will be greatly appreciated! Thanks! ?Nishat. __________________________________________________________________ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080604/0f93c248/attachment.html From lanas at securenet.net Thu Jun 5 18:11:01 2008 From: lanas at securenet.net (lanas) Date: Thu, 5 Jun 2008 21:11:01 -0400 Subject: [tpm] Help on creating PERL APIs In-Reply-To: <274400.53170.qm@web36906.mail.mud.yahoo.com> References: <274400.53170.qm@web36906.mail.mud.yahoo.com> Message-ID: <20080605211101.23231475@mistral.stie> Le Mercredi, 4 Juin 2008 19:46:57 -0700 (PDT), Nishat Ahmad a ?crit : > I am looking for?help in creating Perl APIs. > > I?have a tool written in Perl and want to communicate with other > systems (not in Perl) using APIs. Could you point me to some good > tutorials which will guide?me how to create Perl APIs quickly. Any > help will be greatly appreciated! Thanks! Nishat. As far as I'm concerned, this is pretty vague. _You_ will be doing the API, or so it seems, so you have the choice. If you choose SysV IPC then there are a couple of Perl modules such as IPC::SysV. On the other hand, you might prefer UNIX sockets or even TCP to communicate between processes. Or did you meant that the IPC API is already defined ? Cheers, Al From linux at alteeve.com Fri Jun 6 05:45:24 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 06 Jun 2008 08:45:24 -0400 Subject: [tpm] Help on creating PERL APIs In-Reply-To: <274400.53170.qm@web36906.mail.mud.yahoo.com> References: <274400.53170.qm@web36906.mail.mud.yahoo.com> Message-ID: <48493164.3090508@alteeve.com> Nishat Ahmad wrote: > Hello! > > I am looking for help in creating Perl APIs. > > I have a tool written in Perl and want to communicate with other systems > (not in Perl) using APIs. Could you point me to some good tutorials > which will guide me how to create Perl APIs quickly. > > Any help will be greatly appreciated! Thanks! > > Nishat. Hi Nishat, Al is write, you need to re-cast your question with a bit more specifics before we can begin to help you. It's kind of like saying "I want to learn how to program. Specifically, on computers." :) What Perl tool are you using? What tools do you want to communicate with? What are your goals? Do get back to us, I am sure some here will be happy to help. Just be as specific as you can when you do. Madi PS - It is preferred that, when possible, you send email to mailing lists in plain text format. Many here use text-based mail readers. From arocker at vex.net Wed Jun 11 12:41:59 2008 From: arocker at vex.net (arocker at vex.net) Date: Wed, 11 Jun 2008 15:41:59 -0400 (EDT) Subject: [tpm] O'Reilly at YAPC Message-ID: <49057.199.43.183.133.1213213319.squirrel@webmail.vex.net> Does anyone know if O'Reilly will be selling books at YAPC? I want to get a copy of "Perl Best Practices". I'd order direct, but their shipping policy to Canada (air) eats up all the user group discount. If they are at YAPC, and I could persuade somebody to pick up a copy for me there, that would solve the problem. From samogon at gmail.com Wed Jun 11 13:34:36 2008 From: samogon at gmail.com (Ilia Lobsanov) Date: Wed, 11 Jun 2008 16:34:36 -0400 Subject: [tpm] O'Reilly at YAPC In-Reply-To: <49057.199.43.183.133.1213213319.squirrel@webmail.vex.net> References: <49057.199.43.183.133.1213213319.squirrel@webmail.vex.net> Message-ID: <17CA5BBD-2A6A-4397-A7DD-69CAB6140AA4@gmail.com> I usually order via amazon.ca and spend at least $50 or whatever it is for free shipping. It's always cheaper than chapters online. ilia. On 11-Jun-08, at 3:41 PM, arocker at vex.net wrote: > > Does anyone know if O'Reilly will be selling books at YAPC? > > I want to get a copy of "Perl Best Practices". I'd order direct, but > their shipping policy to Canada (air) eats up all the user group > discount. > If they are at YAPC, and I could persuade somebody to pick up a copy > for > me there, that would solve the problem. > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From dmagnuszewski at yahoo.com Wed Jun 11 15:28:40 2008 From: dmagnuszewski at yahoo.com (Daniel Magnuszewski) Date: Wed, 11 Jun 2008 15:28:40 -0700 (PDT) Subject: [tpm] O'Reilly at YAPC Message-ID: <313290.8967.qm@web33307.mail.mud.yahoo.com> I'm in Buffalo, and I'm planning on coming to see Damian's talk up in Toronto. I'm sure I could be a book mule for you. Let me know. -Dan ----- Original Message ---- From: "arocker at vex.net" To: tpm at to.pm.org Sent: Wednesday, June 11, 2008 3:41:59 PM Subject: [tpm] O'Reilly at YAPC Does anyone know if O'Reilly will be selling books at YAPC? I want to get a copy of "Perl Best Practices". I'd order direct, but their shipping policy to Canada (air) eats up all the user group discount. If they are at YAPC, and I could persuade somebody to pick up a copy for me there, that would solve the problem. _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080611/db0730c0/attachment.html From linux at alteeve.com Thu Jun 12 07:25:14 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 12 Jun 2008 10:25:14 -0400 Subject: [tpm] Using a variable in a 'qw()' Message-ID: <485131CA.7020607@alteeve.com> Hi all, I want to use a variable when calling a module that uses the 'qw()' syntax. Specifically: use Net::DBus::Exporter qw(org.tle_bu.Clients); I would like to be able to say: my $foo="org.tle_bu.Clients"; use Net::DBus::Exporter qw($foo); But '$foo' is passed in directly, rather than it's value. Is there an alternative to 'qw()'? Honestly, I use that syntax all the time but I've never really understood how it works. Perhaps I should be asking for a pointer to a doc that explains this syntax better? Thanks, as always! Madi From mfowle at navicominc.com Thu Jun 12 07:29:03 2008 From: mfowle at navicominc.com (Mark Fowle) Date: Thu, 12 Jun 2008 10:29:03 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: <485131CA.7020607@alteeve.com> References: <485131CA.7020607@alteeve.com> Message-ID: <759E3F14A23281479A85A082BBCFA542491E65@sbsa.NavicomInc.local> qw is just a way of saying quote the following words for me. qw(adam john mary) Is equivalent to ("adam","john","mary") So use Net::DBus::Exporter ($foo); Is a safe and reasonable alternative If you need to mix variables and trings use: use Net::DBus::Exporter ($foo,"bar","baz"); Mark -----Original Message----- From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of Madison Kelly Sent: Thursday, June 12, 2008 10:25 AM To: Toronto Perl Mongers Subject: [tpm] Using a variable in a 'qw()' Hi all, I want to use a variable when calling a module that uses the 'qw()' syntax. Specifically: use Net::DBus::Exporter qw(org.tle_bu.Clients); I would like to be able to say: my $foo="org.tle_bu.Clients"; use Net::DBus::Exporter qw($foo); But '$foo' is passed in directly, rather than it's value. Is there an alternative to 'qw()'? Honestly, I use that syntax all the time but I've never really understood how it works. Perhaps I should be asking for a pointer to a doc that explains this syntax better? Thanks, as always! Madi _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From james.a.graham at gmail.com Thu Jun 12 07:48:26 2008 From: james.a.graham at gmail.com (Jim Graham) Date: Thu, 12 Jun 2008 10:48:26 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: <485131CA.7020607@alteeve.com> References: <485131CA.7020607@alteeve.com> Message-ID: Hi From > perldoc perlop ... Customary Generic Meaning Interpolates '' q{} Literal no "" qq{} Literal yes `` qx{} Command yes* qw{} Word list no // m{} Pattern match yes* qr{} Pattern yes* s{}{} Substitution yes* tr{}{} Transliteration no (but see below) < single quotes) qq{} (double 'q' --> double quotes) helps with remembering if interpolation is done. Unfortunately, that doesn't help with the qw{} construct that doesn't interpolate. You'll have to use the ( $foo, "bar", "baz") construction. - Jim On 12-Jun-08, at 10:25 AM, Madison Kelly wrote: > Hi all, > > I want to use a variable when calling a module that uses the 'qw()' > syntax. Specifically: > > use Net::DBus::Exporter qw(org.tle_bu.Clients); > > I would like to be able to say: > > my $foo="org.tle_bu.Clients"; > use Net::DBus::Exporter qw($foo); > > But '$foo' is passed in directly, rather than it's value. Is there > an > alternative to 'qw()'? Honestly, I use that syntax all the time but > I've > never really understood how it works. Perhaps I should be asking for a > pointer to a doc that explains this syntax better? > > Thanks, as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From james.a.graham at gmail.com Thu Jun 12 08:07:42 2008 From: james.a.graham at gmail.com (Jim Graham) Date: Thu, 12 Jun 2008 11:07:42 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: <485131CA.7020607@alteeve.com> References: <485131CA.7020607@alteeve.com> Message-ID: Hi Sorry about the garbage on my last email. Here's what i meant to say .. From > perldoc perlop ... Customary Generic Meaning Interpolates '' q{} Literal no "" qq{} Literal yes `` qx{} Command yes* qw{} Word list no // m{} Pattern match yes* qr{} Pattern yes* s{}{} Substitution yes* tr{}{} Transliteration no (but see below) < single quotes) qq{} (double 'q' --> double quotes) helps with remembering if interpolation is done. Unfortunately, that doesn't help with the qw{} construct that doesn't interpolate. You'll have to use the ( $foo, "bar", "baz") construction. - Jim On 12-Jun-08, at 10:25 AM, Madison Kelly wrote: > Hi all, > > I want to use a variable when calling a module that uses the 'qw()' > syntax. Specifically: > > use Net::DBus::Exporter qw(org.tle_bu.Clients); > > I would like to be able to say: > > my $foo="org.tle_bu.Clients"; > use Net::DBus::Exporter qw($foo); > > But '$foo' is passed in directly, rather than it's value. Is there > an > alternative to 'qw()'? Honestly, I use that syntax all the time but > I've > never really understood how it works. Perhaps I should be asking for a > pointer to a doc that explains this syntax better? > > Thanks, as always! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From mike at stok.ca Thu Jun 12 09:33:55 2008 From: mike at stok.ca (Mike Stok) Date: Thu, 12 Jun 2008 12:33:55 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: References: <485131CA.7020607@alteeve.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12-Jun-08, at 10:25 AM, Madison Kelly wrote: > Hi all, > > I want to use a variable when calling a module that uses the 'qw()' > syntax. Specifically: > > use Net::DBus::Exporter qw(org.tle_bu.Clients); > > I would like to be able to say: > > my $foo="org.tle_bu.Clients"; > use Net::DBus::Exporter qw($foo); > > But '$foo' is passed in directly, rather than it's value. Is there > an > alternative to 'qw()'? Honestly, I use that syntax all the time but > I've > never really understood how it works. Perhaps I should be asking for a > pointer to a doc that explains this syntax better? > > Thanks, as always! In addition to the things other people have mentioned, you need to be aware of when variables get set. use is a BEGIN time thing, so #!/usr/bin/env perl use strict; use warnings; my $var = ':standard'; use CGI ($var); print header; doesn't do what I intended, and I need to do this to make sure $var is set before the use happens (or something similar depending on what you want the scoping of $var to be): #!/usr/bin/env perl use strict; use warnings; my $var; BEGIN { $var = ':standard'; } use CGI ($var); print header; Hope this helps, Mike - -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkhRT/MACgkQnsTBwAWZE9oEYwCaAs7fBTfkdGHWRjZ5U9347D4L 6QwAn3vWfzdxW1zLlqODp0FjJL6gEDD9 =Aa5Q -----END PGP SIGNATURE----- From linux at alteeve.com Thu Jun 12 10:55:52 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 12 Jun 2008 13:55:52 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: References: <485131CA.7020607@alteeve.com> Message-ID: <48516328.2060500@alteeve.com> Mike Stok wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 12-Jun-08, at 10:25 AM, Madison Kelly wrote: > >> Hi all, >> >> I want to use a variable when calling a module that uses the 'qw()' >> syntax. Specifically: >> >> use Net::DBus::Exporter qw(org.tle_bu.Clients); >> >> I would like to be able to say: >> >> my $foo="org.tle_bu.Clients"; >> use Net::DBus::Exporter qw($foo); >> >> But '$foo' is passed in directly, rather than it's value. Is there >> an >> alternative to 'qw()'? Honestly, I use that syntax all the time but >> I've >> never really understood how it works. Perhaps I should be asking for a >> pointer to a doc that explains this syntax better? >> >> Thanks, as always! > > In addition to the things other people have mentioned, you need to be > aware of when variables get set. use is a BEGIN time thing, so > > #!/usr/bin/env perl > > use strict; > use warnings; > > my $var = ':standard'; > use CGI ($var); > print header; > > doesn't do what I intended, and I need to do this to make sure $var is > set before the use happens (or something similar depending on what you > want the scoping of $var to be): > > #!/usr/bin/env perl > use strict; > use warnings; > > my $var; > BEGIN { $var = ':standard'; } > use CGI ($var); > print header; > > Hope this helps, > > Mike Thanks Mike, Jim and Mark! I'm still struggling to get this working, and I think it might be what Mike is getting at... My variables are set by reading a config file, so sticking the variable into a 'BEGIN {}' won't work as too many things have to have happened before I can call the SR that reads the file and populates my config hash. I tried wrapping the module call in 'END {}', but that also didn't work. Specifically: print "dbus::interface::clients: [$$conf{dbus}{interface}{clients}]\n"; Prints out: dbus::interface::clients: [org.tle_bu.Clients] But when I call: use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); I get: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/Net/DBus/Exporter.pm line 263. Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/Net/DBus/Exporter.pm line 263. interface name '' is not valid.Names must consist of tokens using the characters a-z, A-Z, 0-9, _, with at least two tokens, separated by '.' BEGIN failed--compilation aborted at ./dbus_server line 74. If I call: use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); Or: END { use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); } I get: Use of uninitialized value in string at ./dbus_server line 74. interface name '' is not valid.Names must consist of tokens using the characters a-z, A-Z, 0-9, _, with at least two tokens, separated by '.' BEGIN failed--compilation aborted at ./dbus_server line 74. Also, just to be safe, I tried sticking the value is a simple variable called '$foo', in case being in a hash was part of the problem, but that didn't fix anything. Thanks! Madi From magog at the-wire.com Thu Jun 12 11:10:33 2008 From: magog at the-wire.com (Michael Graham) Date: Thu, 12 Jun 2008 14:10:33 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: <48516328.2060500@alteeve.com> References: <485131CA.7020607@alteeve.com> <48516328.2060500@alteeve.com> Message-ID: <20080612141033.5ac31327@caliope> when you say: my $foo="org.tle_bu.Clients"; use Net::DBus::Exporter ($foo); It is really the equivalent of: my $foo="org.tle_bu.Clients"; BEGIN { require Net::DBus::Exporter; Net::DBus::Exporter->import($foo); } And the BEGIN block gets run before you assign to $foo. Which is not what you want. Instead, do this: my $foo; BEGIN { $foo="org.tle_bu.Clients"; } use Net::DBus::Exporter ($foo); Or: my $foo="org.tle_bu.Clients"; require Net::DBus::Exporter; Net::DBus::Exporter->import($foo); Michael On Thu, 12 Jun 2008 13:55:52 -0400 Madison Kelly wrote: > Mike Stok wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On 12-Jun-08, at 10:25 AM, Madison Kelly wrote: > > > >> Hi all, > >> > >> I want to use a variable when calling a module that uses the > >> 'qw()' syntax. Specifically: > >> > >> use Net::DBus::Exporter qw(org.tle_bu.Clients); > >> > >> I would like to be able to say: > >> > >> my $foo="org.tle_bu.Clients"; > >> use Net::DBus::Exporter qw($foo); > >> > >> But '$foo' is passed in directly, rather than it's value. Is there > >> an > >> alternative to 'qw()'? Honestly, I use that syntax all the time but > >> I've > >> never really understood how it works. Perhaps I should be asking > >> for a pointer to a doc that explains this syntax better? > >> > >> Thanks, as always! > > > > In addition to the things other people have mentioned, you need to > > be aware of when variables get set. use is a BEGIN time thing, so > > > > #!/usr/bin/env perl > > > > use strict; > > use warnings; > > > > my $var = ':standard'; > > use CGI ($var); > > print header; > > > > doesn't do what I intended, and I need to do this to make sure $var > > is set before the use happens (or something similar depending on > > what you want the scoping of $var to be): > > > > #!/usr/bin/env perl > > use strict; > > use warnings; > > > > my $var; > > BEGIN { $var = ':standard'; } > > use CGI ($var); > > print header; > > > > Hope this helps, > > > > Mike > > Thanks Mike, Jim and Mark! > > I'm still struggling to get this working, and I think it might be > what Mike is getting at... My variables are set by reading a config > file, so sticking the variable into a 'BEGIN {}' won't work as too > many things have to have happened before I can call the SR that reads > the file and populates my config hash. I tried wrapping the module > call in 'END {}', but that also didn't work. > > Specifically: > > print "dbus::interface::clients: > [$$conf{dbus}{interface}{clients}]\n"; > > Prints out: > > dbus::interface::clients: [org.tle_bu.Clients] > > But when I call: > > use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); > > I get: > > Use of uninitialized value in pattern match (m//) at > /usr/lib/perl5/Net/DBus/Exporter.pm line 263. > Use of uninitialized value in concatenation (.) or string at > /usr/lib/perl5/Net/DBus/Exporter.pm line 263. > interface name '' is not valid.Names must consist of tokens using the > characters a-z, A-Z, 0-9, _, with at least two tokens, separated by > '.' BEGIN failed--compilation aborted at ./dbus_server line 74. > > If I call: > > use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); > > Or: > > END { use Net::DBus::Exporter qq($$conf{dbus}{interface}{clients}); } > > I get: > > Use of uninitialized value in string at ./dbus_server line 74. > interface name '' is not valid.Names must consist of tokens using the > characters a-z, A-Z, 0-9, _, with at least two tokens, separated by > '.' BEGIN failed--compilation aborted at ./dbus_server line 74. > > Also, just to be safe, I tried sticking the value is a simple > variable called '$foo', in case being in a hash was part of the > problem, but that didn't fix anything. > > Thanks! > > Madi > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -- Michael Graham From linux at alteeve.com Thu Jun 12 12:37:41 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 12 Jun 2008 15:37:41 -0400 Subject: [tpm] Using a variable in a 'qw()' In-Reply-To: <20080612141033.5ac31327@caliope> References: <485131CA.7020607@alteeve.com> <48516328.2060500@alteeve.com> <20080612141033.5ac31327@caliope> Message-ID: <48517B05.8050405@alteeve.com> Michael Graham wrote: > > when you say: > > my $foo="org.tle_bu.Clients"; > use Net::DBus::Exporter ($foo); > > It is really the equivalent of: > > my $foo="org.tle_bu.Clients"; > BEGIN { > require Net::DBus::Exporter; > Net::DBus::Exporter->import($foo); > } > > And the BEGIN block gets run before you assign to $foo. Which is not what you > want. > > Instead, do this: > > my $foo; > BEGIN { > $foo="org.tle_bu.Clients"; > } > use Net::DBus::Exporter ($foo); > > Or: > > my $foo="org.tle_bu.Clients"; > require Net::DBus::Exporter; > Net::DBus::Exporter->import($foo); > > > Michael Thanks, Michael! Using: require Net::DBus::Exporter; Net::DBus::Exporter->import($$conf{dbus}{interface}{clients}); Worked, thanks! I hadn't realized the difference between 'use' and 'require' until I saw that 'use Net::DBus::Exporter' didn't work. Yay 'perldoc -f use'! :) Madi Madi From linux at alteeve.com Fri Jun 13 05:54:10 2008 From: linux at alteeve.com (Madison Kelly) Date: Fri, 13 Jun 2008 08:54:10 -0400 Subject: [tpm] Event loop, redux Message-ID: <48526DF2.1030609@alteeve.com> Hi all, A while ago I was asking about event loops. Richard and Mike recommended I look at POE, and well, as Alan put it, it's an OS written in Perl. Very impressive, but very overkill for my needs. :) I've got a pretty simple problem which I would like to solve using as simple a solution as possible. To avoid further module dependency, I'd also like to avoid using non-core modules, if possible. I've got a simple server program that listens for TCP connections from clients which, on connect, spawns a child process to handle the client. Already I can talk between the client and the server to establish a connection (password verification), but then I am stumped, so I close the connection. What I want is a way to keep the connection open (indefinitely, or until a given event/timeout occurs). At this point, communication will always be initiated by the server, so I just need to event loop listen to commands from the server, then send the request to the client, wait for the reply, process the reply, then go back to wait. Ideally, the loop could be asynchronous, but simply having a way to queue calls would work, too. Any suggestions? My googling has shown me for 'perl event loop tutorial' has turned up example using various existing modules (ie: using gtk libs)... I need something very generic. :) Thanks for letting me ask so many questions! Madi From xdaveg at gmail.com Fri Jun 13 06:05:48 2008 From: xdaveg at gmail.com (David Golden) Date: Fri, 13 Jun 2008 09:05:48 -0400 Subject: [tpm] Event loop, redux In-Reply-To: <48526DF2.1030609@alteeve.com> References: <48526DF2.1030609@alteeve.com> Message-ID: <5d4beb40806130605s645045fk2b987a8c9a590c8b@mail.gmail.com> On Fri, Jun 13, 2008 at 8:54 AM, Madison Kelly wrote: > A while ago I was asking about event loops. Richard and Mike > recommended I look at POE, and well, as Alan put it, it's an OS written > in Perl. > > Very impressive, but very overkill for my needs. :) > > I've got a simple server program that listens for TCP connections > from clients which, on connect, spawns a child process to handle the > client. Already I can talk between the client and the server to > establish a connection (password verification), but then I am stumped, > so I close the connection. I haven't jumped into POE myself, but in trying to decide if/when I should, I did find this tutorial: http://poe.perl.org/?Evolution_of_a_POE_Server It shows a simple TCP server -- written the hard way. Then it gradually swaps out pieces of it with POE components using greater and greater levels of abstraction until the final program is quite small and elegant. It's both a good tutorial and a good argument for why to use POE. I think it will help you regardless of whether you ultimately choose to use POE or not. -- David From talexb at gmail.com Fri Jun 13 07:32:30 2008 From: talexb at gmail.com (Alex Beamish) Date: Fri, 13 Jun 2008 10:32:30 -0400 Subject: [tpm] Event loop, redux In-Reply-To: <5d4beb40806130605s645045fk2b987a8c9a590c8b@mail.gmail.com> References: <48526DF2.1030609@alteeve.com> <5d4beb40806130605s645045fk2b987a8c9a590c8b@mail.gmail.com> Message-ID: On Fri, Jun 13, 2008 at 9:05 AM, David Golden wrote: > On Fri, Jun 13, 2008 at 8:54 AM, Madison Kelly wrote: >> A while ago I was asking about event loops. Richard and Mike >> recommended I look at POE, and well, as Alan put it, it's an OS written >> in Perl. >> >> Very impressive, but very overkill for my needs. :) >> >> I've got a simple server program that listens for TCP connections >> from clients which, on connect, spawns a child process to handle the >> client. Already I can talk between the client and the server to >> establish a connection (password verification), but then I am stumped, >> so I close the connection. > > I haven't jumped into POE myself, but in trying to decide if/when I > should, I did find this tutorial: > > http://poe.perl.org/?Evolution_of_a_POE_Server > > It shows a simple TCP server -- written the hard way. Then it > gradually swaps out pieces of it with POE components using greater and > greater levels of abstraction until the final program is quite small > and elegant. It's both a good tutorial and a good argument for why to > use POE. > > I think it will help you regardless of whether you ultimately choose > to use POE or not. Just to echo David's comments, while POE may seem to be overkill, it will probably do exactly what you want. I haven't used POE myself, but I have been hearing about it on and off for some time (YAPC 2001? Is that possible?). I'll give you another example: recently at $work, I wanted to be able to include a configuration file into a web page (it's an applet tag for a Java application), and fail gracefully if the config file was absent. I could have written all kinds of complicated code to take care of that, but Template Tookit was available, so I just added a TRY INCLUDE CATCH END lump of code in the template that I created, and I was done -- and it works fine. TT is a vast piece of code just to get that little piece of functionality, but it sure saved me from re-inventing the wheel, and I have a solution that I have lots of confidence in. -- Alex Beamish Toronto, Ontario aka talexb From arocker at vex.net Sun Jun 15 08:51:35 2008 From: arocker at vex.net (arocker at vex.net) Date: Sun, 15 Jun 2008 11:51:35 -0400 (EDT) Subject: [tpm] Event loop, redux In-Reply-To: <48526DF2.1030609@alteeve.com> References: <48526DF2.1030609@alteeve.com> Message-ID: <61106.67.204.18.192.1213545095.squirrel@webmail.vex.net> What if the listener forks off a process for each connection? The forked processes can then wait for the various events of each connection to take place in order, while the listener goes back to listening. (An architecture not wholly dissimmilar to inetd's, if I am not mistaken.) From linux at alteeve.com Thu Jun 19 10:08:08 2008 From: linux at alteeve.com (Madison Kelly) Date: Thu, 19 Jun 2008 13:08:08 -0400 Subject: [tpm] Solved: Re: Populating an unfixed number of hash elements In-Reply-To: <20080509174607.GD10094@sourcery.ca> References: <4824713B.5060202@alteeve.com> <20080509165848.GB10094@sourcery.ca> <20080509170819.GC10094@sourcery.ca> <18468.37191.279335.360264@hetman.ua> <20080509174607.GD10094@sourcery.ca> Message-ID: <485A9278.3060605@alteeve.com> I responded to this some time ago, but neglected to include TPM in the reply-to. I hope people don't mind me re-sending this after so much time, but I wanted to get in into the archives, in case it helps someone down the road. The variation I used is at the end of this message. Thanks again, Shaun and Viktor! Madi Shaun Fryer wrote: > Nice and small. I like it. Here's the alternate solution I just came up with. > Like yours, uses a recursive helper function, but also works with a global hash. > > ################################################################################ > use strict; > use warnings; > use Data::Dumper; > > my $string1="some::string::of::elements"; > my $string2="some::string"; > my $string3="some::string::of::other::elements"; > my $string4="another::set::of::keys"; > > my %hash = (); > > mk_href(\%hash, $string1, "a value"); > mk_href(\%hash, $string2, 12); > mk_href(\%hash, $string3, "a really long string that takes up pages"); > mk_href(\%hash, $string4, "something else again."); > print Dumper \%hash; > > sub mk_href { > my ($href, $keystr, $value) = @_; > my @keys = split /::/, $keystr; > my $last_key = pop @keys; > my $_href = {}; > $_href->{$last_key} = { $value => 1 }; > while (my $key = pop @keys) { > my $elem = {}; > $elem->{$key} = $_href; > $_href = $elem; > } > add_href($href, $_href); > } > > sub add_href { > my ($href1, $href2) = @_; > for my $key (keys %$href2) { > if (ref $href1->{$key} eq 'HASH') { > add_href( $href1->{$key}, $href2->{$key} ); > } else { > $href1->{$key} = $href2->{$key}; > } > } > } > ################################################################################ > -- > Shaun Fryer > cl: 905-920-9209 > > On Fri, May 09, 2008 at 02:00:39PM -0400, Viktor Pavlenko wrote: >>>>>>> "SF" == Shaun Fryer writes: >> SF> Actually, this may be more what you intended. However, notice >> SF> that the key/value may get over-ridden in case of >> SF> collisions. >> >> If she avoids global hash, there will be no problem ... >> >> SF> sub mk_href { >> SF> my ($href, $keystr, $value) = @_; >> SF> my @keys = split /::/, $keystr; >> SF> my $last_key = pop @keys; >> SF> my $_href = {}; >> SF> $_href->{$last_key} = $value; >> SF> while (my $key = pop @keys) { >> SF> my $elem = {}; >> SF> $elem->{$key} = $_href; >> SF> $_href = $elem; >> SF> } >> SF> $href->{$_} = $_href->{$_} for keys %$_href; >> SF> } >> >> ... and then this: >> >> -------------------------------------------------------------------->8 >> sub mk_href >> { >> my ($keystr, $value) = @_; >> my @keys = reverse split /::/, $keystr; >> helper($value, @keys); >> } >> >> sub helper >> { >> my ($val, @keys) = @_; >> my $k = pop @keys; >> my $hr = {}; >> $hr->{$k} = ($#keys == -1) ? $val : helper($val, @keys); >> return $hr; >> } >> -------------------------------------------------------------------->8 >> >> -- >> Viktor >> > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > Thank you both very kindly! I needed to make a slight change, but the final example was close to perfect. The only real difference was that you're example was using the $value as a final key in the hash, set to a value of '1'. I needed the '$value' to be the contents of the hash string. For reference: -=-=-=-=-=- # Contributed by Shaun Fryer and Viktor Pavlenko by way of GTALUG. sub _mk_href { my $self=shift; my $href=shift; my $key_string=shift; my $value=shift; if ($self->{CHOMP_ROOT}) { $key_string=~s/\w+:://; } my @keys = split /::/, $key_string; my $last_key = pop @keys; my $_href = {}; $_href->{$last_key}=$value; while (my $key = pop @keys) { my $elem = {}; $elem->{$key} = $_href; $_href = $elem; } $self->_add_href($href, $_href); } sub _add_href { my $self=shift; my $href1=shift; my $href2=shift; for my $key (keys %$href2) { if (ref $href1->{$key} eq 'HASH') { $self->_add_href( $href1->{$key}, $href2->{$key} ); } else { $href1->{$key} = $href2->{$key}; } } } -=-=-=-=-=- The '$self=shift;' line is needed as these are methods in a module, so '$self' is the first value shifted in. The leading '_' is just to indicate that, in my case, these are internal methods. The '$_href->{$last_key}=$value;' is what I changed to have the value be the stored data. Lastly, 'if ($self->{CHOMP_ROOT}) { $key_string=~s/\w+:://; }' is an internal variable that I use the check I am to mimic XML::Simple's habit of dropping the initial hash reference (no, I have no idea why it does this, but I need my module to be a drop-in replacement for it, so...). Thanks again, you guys were a huge help! Madi From arocker at vex.net Tue Jun 24 14:11:25 2008 From: arocker at vex.net (arocker at vex.net) Date: Tue, 24 Jun 2008 17:11:25 -0400 (EDT) Subject: [tpm] YAPC Debriefing - speakers sought Message-ID: <27386.199.43.183.133.1214341885.squirrel@webmail.vex.net> Who went to YAPC and would like to make we poor, grounded schmucks feel jealous on thursday by telling us all the wondrous happenings that they can remember? From magog at the-wire.com Tue Jun 24 19:38:02 2008 From: magog at the-wire.com (Michael Graham) Date: Tue, 24 Jun 2008 22:38:02 -0400 Subject: [tpm] June Meeting - Thu 26 Jun, 2008 Message-ID: <20080624223802.36be2d25@caliope> (These details are also on the TPM web site: http://to.pm.org/) The next meeting is this Thursday, 26 Jun. Date: Thursday 29 May 2008 Time: 6:45pm Cost: Free! Where: 2 Bloor Street West (NW corner of Yonge/Bloor, skyscraper with the CIBC logo on top) Classroom 15 on the 8th floor =================================================================== Description: We don't have a speaker lined up, but hopefully some of the lucky people who went to YAPC this year will tell the rest of TPM their stories of all the cool stuff they did. Note: The elevators in the building are "locked down" after 5:30pm to people without building access cards. Leading up to the meeting someone will come down to the main floor lobby every few minutes to ferry people upstairs. After 19:00, you can reach the access-card-carrying guy via a cell phone number that we'll leave with security in the front lobby. The room and floor numbers will be left with security too. -- Michael Graham From lanas at securenet.net Wed Jun 25 18:33:04 2008 From: lanas at securenet.net (lanas) Date: Wed, 25 Jun 2008 21:33:04 -0400 Subject: [tpm] Event loop, redux In-Reply-To: <5d4beb40806130605s645045fk2b987a8c9a590c8b@mail.gmail.com> References: <48526DF2.1030609@alteeve.com> <5d4beb40806130605s645045fk2b987a8c9a590c8b@mail.gmail.com> Message-ID: <20080625213304.5450c5f9@mistral.stie> Le Vendredi, 13 Juin 2008 09:05:48 -0400, "David Golden" a ?crit : > I haven't jumped into POE myself, but in trying to decide if/when I > should, I did find this tutorial: I've used POE for a few things, from plain TCP connections to serial port comms and ncurses, to watching files and various utilities. Although I've used curses, there are WxWidgets and GTK event loops. And there's one that the author of the Prima toolkit (GUI all written in Perl that I've used on several occasions) has sent me some time ago but haven't had the opportunity to test yet. There are many nice aspects to POE. One is the ability to encapsulate concerns in such a way that they really are accessible only via messages. Not pointers to objects, but real messages as per classical text books on object-orientation. But if you don't want a multi-process app, then that's also fine. It's most often easy to adapt a standard module to POE. Take a close look at the POE module for syslog usage. Another nice aspect is to have an internal communication channel (POE's own) while maintaining external (TCP, serial) communications. All POE modules can communicate between themselves in such a manner. And although I haven't tried it yet, several distinct POE apps can exchange msgs between themselves using inter-kernel communications (IKC). I'm currently having some kind of framework going. Basically I'm going towards the definition of an API that facilitates user interfaces and application while isolating proper processing. Nothing fancy. A main POE session launches other POE modules for network comms, UI interface, and each of these modules communicate using a well-defined, hopefully common, API. All data is sent back to the main app for processing and in turn the main app is using custom-made plain Perl modules to do this. The goal is to have an easy to implment framework that can adapt itself to various jobs, be them on a intranet (communicating with a NMS) or internet. In one word, POE is fun. When I discovered Perl a few years ago I was pleasantly surprised by the language. When I discovered POE on top of that, then it was delight. Cheers. Al From fulko.hew at gmail.com Fri Jun 27 07:19:42 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Fri, 27 Jun 2008 10:19:42 -0400 Subject: [tpm] dereferencing arrays Message-ID: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> I'm brain dead today, because I can't get this to work... Net::SMTP... My problem is that Net::SMTP takes an argument for the destination host to send mail to. In some cases that destination FQDN resolves into a list of actual IP addresses. Net::SMTP isn't smart enough to resolve that name and traverse that list itself. So... I build by own list and pass it in (the docs says I can). My trouble is that I'm not doing it right. The routine that gets called in the end looks like this: my $host = shift; foreach $h (@{$host}) { ... } So the docs say pass in a reference to an array (containing the list) @list = ['1.2.3.4', '2.3.4.5']; Net::SMTP->new(\@list, ...); This causes the receiving end to think it has one entity which is the reference to the array. What am I missing? TIA Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080627/4b2e4d55/attachment.html From ejanev at gmail.com Fri Jun 27 07:26:55 2008 From: ejanev at gmail.com (Emil Janev) Date: Fri, 27 Jun 2008 10:26:55 -0400 Subject: [tpm] dereferencing arrays In-Reply-To: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> References: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> Message-ID: Hi Fulko, Most probably you are thinking right but typing wrong :) Why don't you try: @list = ('1.2.3.4', '2.3.4.5'); instead of @list = ['1.2.3.4', '2.3.4.5']; Regards, Emil On Fri, Jun 27, 2008 at 10:19 AM, Fulko Hew wrote: > I'm brain dead today, because I can't get this to work... > > Net::SMTP... > > My problem is that Net::SMTP takes an argument for the destination > host to send mail to. In some cases that destination FQDN resolves > into a list of actual IP addresses. Net::SMTP isn't smart enough to > resolve that name and traverse that list itself. So... I build by own list > and pass it in (the docs says I can). My trouble is that I'm not > doing it right. > > The routine that gets called in the end looks like this: > > my $host = shift; > foreach $h (@{$host}) { ... } > > So the docs say pass in a reference to an array (containing the list) > > @list = ['1.2.3.4', '2.3.4.5']; > Net::SMTP->new(\@list, ...); > > This causes the receiving end to think it has one entity which is the > reference to the array. > > What am I missing? > > TIA > Fulko > > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > > -- Emil Janev From rdice at pobox.com Fri Jun 27 07:27:41 2008 From: rdice at pobox.com (Richard Dice) Date: Fri, 27 Jun 2008 10:27:41 -0400 Subject: [tpm] dereferencing arrays In-Reply-To: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> References: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> Message-ID: <5bef4baf0806270727g4548b1f0p747418dac68080a4@mail.gmail.com> > > So the docs say pass in a reference to an array (containing the list) > > @list = ['1.2.3.4', '2.3.4.5']; > Net::SMTP->new(\@list, ...); > Meh? I haven't looked at the docs for Net::SMTP, but this just looks weird to me. What you're creating within @list is an array wherein the 0-th element is itself a listref. Then, you pass a _reference_ to this list? I would think that what you'd want is... @list = ('1.2.3.4', '2.3.4.5'); Net::SMTP->new(\@list, ...); I.e. if Net::SMTP wants a listref, it probably doesn't want a double listref. Cheers, - Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080627/4ca7f9f4/attachment.html From drew at ss.org Fri Jun 27 07:33:11 2008 From: drew at ss.org (Drew Sullivan) Date: Fri, 27 Jun 2008 10:33:11 -0400 Subject: [tpm] dereferencing arrays In-Reply-To: References: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> Message-ID: <1214577192.16838.4.camel@drugs.int.iplink.net> Since $host = shift line require a "Scalar" then you need: $host_list = ['1.2.3.4', '2.3.4.5']; # host_list is a ref to an array ######## NOT A LIST but a pointer to a LIST ###### now pass $host_list rather than @list. On Fri, 2008-06-27 at 10:26 -0400, Emil Janev wrote: > Hi Fulko, > > Most probably you are thinking right but typing wrong :) > > Why don't you try: > > @list = ('1.2.3.4', '2.3.4.5'); > > instead of > > @list = ['1.2.3.4', '2.3.4.5']; > > Regards, > Emil > > > On Fri, Jun 27, 2008 at 10:19 AM, Fulko Hew wrote: > > I'm brain dead today, because I can't get this to work... > > > > Net::SMTP... > > > > My problem is that Net::SMTP takes an argument for the destination > > host to send mail to. In some cases that destination FQDN resolves > > into a list of actual IP addresses. Net::SMTP isn't smart enough to > > resolve that name and traverse that list itself. So... I build by own list > > and pass it in (the docs says I can). My trouble is that I'm not > > doing it right. > > > > The routine that gets called in the end looks like this: > > > > my $host = shift; > > foreach $h (@{$host}) { ... } > > > > So the docs say pass in a reference to an array (containing the list) > > > > @list = ['1.2.3.4', '2.3.4.5']; > > Net::SMTP->new(\@list, ...); > > > > This causes the receiving end to think it has one entity which is the > > reference to the array. > > > > What am I missing? > > > > TIA > > Fulko > > > > > > > > _______________________________________________ > > toronto-pm mailing list > > toronto-pm at pm.org > > http://mail.pm.org/mailman/listinfo/toronto-pm > > > > > > > From fulko.hew at gmail.com Fri Jun 27 07:54:09 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Fri, 27 Jun 2008 10:54:09 -0400 Subject: [tpm] dereferencing arrays In-Reply-To: <8204a4fe0806270733m291b1769nc4f7bdeb296a6ef6@mail.gmail.com> References: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> <5bef4baf0806270727g4548b1f0p747418dac68080a4@mail.gmail.com> <8204a4fe0806270733m291b1769nc4f7bdeb296a6ef6@mail.gmail.com> Message-ID: <8204a4fe0806270754t2f89eb17s599f3b3f8be09688@mail.gmail.com> I'm looking closer and yes, my example was wrong, I was actually using () instead of [], but the target has its additional indirection too. refer to the corrections below: my $host = shift; my $hosts = [ $host ]; foreach $h (@{$hosts}) { ... } and I'm actually calling it with: @list = ('1.2.3.4', '2.3.4.5'); Net::SMTP->new(\@list, ...); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080627/17f861f0/attachment.html From fulko.hew at gmail.com Fri Jun 27 08:55:21 2008 From: fulko.hew at gmail.com (Fulko Hew) Date: Fri, 27 Jun 2008 11:55:21 -0400 Subject: [tpm] dereferencing arrays In-Reply-To: <8204a4fe0806270754t2f89eb17s599f3b3f8be09688@mail.gmail.com> References: <8204a4fe0806270719l7d24d6e6k46175a36d2395877@mail.gmail.com> <5bef4baf0806270727g4548b1f0p747418dac68080a4@mail.gmail.com> <8204a4fe0806270733m291b1769nc4f7bdeb296a6ef6@mail.gmail.com> <8204a4fe0806270754t2f89eb17s599f3b3f8be09688@mail.gmail.com> Message-ID: <8204a4fe0806270855u436fada9hbdd6e245e12539ea@mail.gmail.com> On Fri, Jun 27, 2008 at 10:54 AM, Fulko Hew wrote: I'm looking closer and yes, my example was wrong, > ... snip ... following up on my own post... It turns out that (I think) there were problems in the _early_ version of Net::SMTP I had on my system that didn't properly handle lists of MTAs. I see that a newer version has re-written that part of the code. Once I upgraded my Net::SMTP, I could successfully use the approach: Net::SMTP->new(\@host_list, ... ); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080627/a265990f/attachment.html From arocker at vex.net Fri Jun 27 09:53:28 2008 From: arocker at vex.net (arocker at vex.net) Date: Fri, 27 Jun 2008 12:53:28 -0400 (EDT) Subject: [tpm] Apropos, I think. Message-ID: <45731.199.43.183.133.1214585608.squirrel@webmail.vex.net> http://ars.userfriendly.org/cartoons/?id=20080627