From autarch at urth.org Wed May 3 12:33:30 2006 From: autarch at urth.org (Dave Rolsky) Date: Wed, 3 May 2006 14:33:30 -0500 (CDT) Subject: [Mpls-pm] O'Reilly UG Program News: DSUG Discount Changes (fwd) Message-ID: In case anyone's interested. Discounts on ORA books for user group members. ---------- Forwarded message ---------- Date: Wed, 03 May 2006 12:16:34 -0700 From: Marsee Henon To: autarch at urth.org Subject: O'Reilly UG Program News: DSUG Discount Changes Hello, Can you please let your members know about the increase in our user group discount? You can post this to your mailing list, web site, or in your newsletter and please make sure you mention this at your next meeting. Get 30% off a single book or 35% off two or more books from O'Reilly, No Starch, Paraglyph, PC Publishing, Pragmatic Bookshelf, SitePoint, or Syngress books you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. Free ground shipping on orders $29.95 or more in the US. Other benefits you receive when you buy directly from O'Reilly include: *100% Satisfaction Guarantee* If, for any reason, you're not completely satisfied with your purchase, return it to us and get your money back. A return shipping label is included with every direct purchase, and directions are posted online in case you've misplaced it: . *Safari Enabled* Whenever possible, our books are "Safari Enabled." This means you can access your book for free online for 45 days through the O'Reilly Safari Bookshelf. How do you know if your book is Safari Enabled? Turn your book over and look for the "Safari Enabled" logo on the bottom right of the page. If it's there, flip through the last couple pages of your book until you find directions for accessing your book online. *Booktech* Have a question about your book? O'Reilly is the only publisher that offers tech support for books. Send an email to and we'll help you out. Be specific: Include the book title and page number. It's also a good idea to include the ISBN so we know what edition you have. *Reader Reviews* Our reader reviews are read by most people at O'Reilly, including Tim O'Reilly, all our editors, as well as sales, marketing, and PR. So if you have praise, a gripe, or ideas for improvement, writing a reader review on oreilly.com is a sure way for your voice to be heard. Just go to your book's catalog page on oreilly.com and click the "Write a Review" button. *Book Registration* Register your book online and we'll notify you when the book has been updated or a new edition is available. You can also win books and other prizes. Haven't registered your books? Just go to . *Newsletters* Our newsletters keep you updated on the latest articles, books, news, and events. A complete list of newsletters and lists can be found at . We're working on a slew of additional benefits to serve you even better so stay tuned. As always, thanks for your help spreading the word. Marsee Henon ================================================================ O'Reilly 1005 Gravenstein Highway North Sebastopol, CA 95472 http://ug.oreilly.com/ http://ug.oreilly.com/creativemedia/ ================================================================ From ian at indecorous.com Mon May 8 08:58:44 2006 From: ian at indecorous.com (Ian Malpass) Date: Mon, 08 May 2006 10:58:44 -0500 Subject: [Mpls-pm] Meeting Wed. In-Reply-To: <444E446D.5070506@indecorous.com> References: <443AD8EF.5010405@peknet.com> <443ADA00.6090004@indecorous.com> <443ADC53.5070709@peknet.com> <444E446D.5070506@indecorous.com> Message-ID: <445F6AB4.2020906@indecorous.com> Are we having a tech meeting on Wednesday then? I think I've volunteered to do more OOP, and Peter Karman was going to talk about Catalyst, but two talks does not a meeting make. Did we have anything else? There was talk of some Pod::Simple::HTML stuff, but neither Peter nor I have had/will have the time to prepare anything for this Wednesay. Ian From glenn at easy-access.com Mon May 8 11:36:11 2006 From: glenn at easy-access.com (Glenn Bushee) Date: Mon, 8 May 2006 13:36:11 -0500 Subject: [Mpls-pm] CGI.pm and forking question Message-ID: This shouldn't be difficult, but I have to admit that I'm stumped with this one and would appreciate any advice. I'm working on a form so that someone can submit data, it gets saved to a file, and the user gets a nice little thank you screen that goes into a redirect mode until a forked process completes its analysis of the data. The problem I'm hitting is that the parent process seems to hang around and won't invoke the meta redirect until the exec in the child is done. This doesn't make sense to me. Here is the snippet: #!/usr/bin/perl use CGI qw(:standard); if (param('submit') ne '') { my $seq = param('seq'); # $seq gets cleaned up and saved out to a specific location # fork submitted, start redirecting for polling for results print header, "", qq~~, "

Sequence Submitted!

Redirecting ...\n"; # double-fork trick because of zombies (got this from some web searching) unless ($pid = fork) { unless (fork) { exec("PATH_TO_ANALYSIS_PROGRAM", "0041"); # 0041 is a hard coded ARG value for now exit(0); } exit(0); } # fork submitted, start redirecting for polling for results exit(0); } Thank you. - Glenn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/mpls-pm/attachments/20060508/3378c137/attachment.html From autarch at urth.org Mon May 8 15:26:15 2006 From: autarch at urth.org (Dave Rolsky) Date: Mon, 8 May 2006 17:26:15 -0500 (CDT) Subject: [Mpls-pm] testing Message-ID: Ian M said he sent a message this morning and it didn't go through, so this is a test. -dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/ From twists at gmail.com Tue May 9 13:40:52 2006 From: twists at gmail.com (Joshua ben Jore) Date: Tue, 9 May 2006 15:40:52 -0500 Subject: [Mpls-pm] CGI.pm and forking question In-Reply-To: References: Message-ID: On 5/8/06, Glenn Bushee wrote: > The problem I'm hitting is that the parent process seems to hang around and > won't invoke the meta redirect until the exec in the child is done. This > doesn't make sense to me. See Suffering from Buffering at http://perl.plover.com/FAQs/Buffering.html. If that's not it I'd go look at what happens when you $SIG{CHLD} to something mentioned in perlipc. Josh From glenn at easy-access.com Tue May 9 14:46:13 2006 From: glenn at easy-access.com (Glenn Bushee) Date: Tue, 9 May 2006 16:46:13 -0500 Subject: [Mpls-pm] CGI.pm and forking question In-Reply-To: References: Message-ID: Josh, thank you for the link. I found a related post that MJD made on the topic (http://www.plover.com/~mjd/misc/dyana) and eventually got it working properly using the following line within the double-fork routine: exec("PATH_TO_ANALYSIS_PROGRAM '0041' >/dev/null &"); While 0041 is a temporary value, for my purposes it will be replaced with a variable that will go through quite a bit of cleaning since I did NOT get this to work trying to string it together such as: exec("PATH_TO_ANALYSIS_PROGRAM", "0041", ">/dev/null &"); # did not work Thank you again. - Glenn On 5/9/06, Joshua ben Jore wrote: > > On 5/8/06, Glenn Bushee wrote: > > The problem I'm hitting is that the parent process seems to hang around > and > > won't invoke the meta redirect until the exec in the child is > done. This > > doesn't make sense to me. > > See Suffering from Buffering at > http://perl.plover.com/FAQs/Buffering.html. If that's not it I'd go > look at what happens when you $SIG{CHLD} to something mentioned in > perlipc. > > Josh > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/mpls-pm/attachments/20060509/e52692d2/attachment.html From gary.vollink at gmail.com Tue May 9 19:15:41 2006 From: gary.vollink at gmail.com (Gary Vollink) Date: Tue, 9 May 2006 21:15:41 -0500 Subject: [Mpls-pm] Meeting Wed. In-Reply-To: <445F6AB4.2020906@indecorous.com> References: <443AD8EF.5010405@peknet.com> <443ADA00.6090004@indecorous.com> <443ADC53.5070709@peknet.com> <444E446D.5070506@indecorous.com> <445F6AB4.2020906@indecorous.com> Message-ID: I, for one, am looking forward to tomorrow's meeting, whether at the Royale, or anywhere else. Who's up for what? On 5/8/06, Ian Malpass wrote: > Are we having a tech meeting on Wednesday then? I think I've volunteered > to do more OOP, and Peter Karman was going to talk about Catalyst, but > two talks does not a meeting make. Did we have anything else? There was > talk of some Pod::Simple::HTML stuff, but neither Peter nor I have > had/will have the time to prepare anything for this Wednesay. > > Ian > _______________________________________________ > Mpls-pm mailing list > Mpls-pm at pm.org > http://mail.pm.org/mailman/listinfo/mpls-pm > From peter at peknet.com Wed May 10 06:17:55 2006 From: peter at peknet.com (Peter Karman) Date: Wed, 10 May 2006 08:17:55 -0500 Subject: [Mpls-pm] Meeting Wed. In-Reply-To: <445F6AB4.2020906@indecorous.com> References: <443AD8EF.5010405@peknet.com> <443ADA00.6090004@indecorous.com> <443ADC53.5070709@peknet.com> <444E446D.5070506@indecorous.com> <445F6AB4.2020906@indecorous.com> Message-ID: <4461E803.7050205@peknet.com> Life has intervened on my behalf, and I can't make tonight's meeting. Sorry for the short notice. I assume since I haven't heard much noise about a meeting that others are not planning on it anyway (?) Next month... pek Ian Malpass scribbled on 5/8/06 10:58 AM: > Are we having a tech meeting on Wednesday then? I think I've volunteered > to do more OOP, and Peter Karman was going to talk about Catalyst, but > two talks does not a meeting make. Did we have anything else? There was > talk of some Pod::Simple::HTML stuff, but neither Peter nor I have > had/will have the time to prepare anything for this Wednesay. > > Ian > _______________________________________________ > Mpls-pm mailing list > Mpls-pm at pm.org > http://mail.pm.org/mailman/listinfo/mpls-pm > -- Peter Karman . http://peknet.com/ . peter at peknet.com From ian at indecorous.com Wed May 10 07:32:40 2006 From: ian at indecorous.com (Ian Malpass) Date: Wed, 10 May 2006 09:32:40 -0500 Subject: [Mpls-pm] YAPC::NA 2006 Message-ID: <4461F988.20901@indecorous.com> In the absence of a technical meeting, I can't tell you all about this in person, so I'm forwarding on the mail. There are at least two of our number speaking at the conference, it's nearby, you should go. Ian -------- Original Message -------- Subject: Tonight's PM Meeting Date: Wed, 10 May 2006 09:50:37 -0400 From: Josh McAdams To: ian at indecorous.com Ian, I saw that you were talking at the MPLS.pm meeting tonight. Would you mind mentioning YAPC to your other PM members? We are trying to let everyone know about the conference, but it's hard to do so in a non-spammy fashion. If you don't mind mentioning it, the conference is in Chicago. It will be held June 26th-28th, with two days of open classes immediately afterward. There are four tracks of talks including talks by Larry Wall, Randal Schwartz, Damian Conway, Audrey Tang, etc. The conference website is at http://www.yapcchicago.org and there is a poster/handout at http://www.yapcchicago.org/yapc_poster.pdf. Thanks, Josh From twists at gmail.com Wed May 10 09:51:10 2006 From: twists at gmail.com (Joshua ben Jore) Date: Wed, 10 May 2006 11:51:10 -0500 Subject: [Mpls-pm] Meeting Wed. In-Reply-To: <4461E803.7050205@peknet.com> References: <443AD8EF.5010405@peknet.com> <443ADA00.6090004@indecorous.com> <443ADC53.5070709@peknet.com> <444E446D.5070506@indecorous.com> <445F6AB4.2020906@indecorous.com> <4461E803.7050205@peknet.com> Message-ID: On 5/10/06, Peter Karman wrote: > Life has intervened on my behalf, and I can't make tonight's meeting. > Sorry for the short notice. I assume since I haven't heard much noise > about a meeting that others are not planning on it anyway (?) Ooh, er. Espresso Royale is is. I'll be there. Not til 7:30ish though. Josh From autarch at urth.org Wed May 10 09:57:59 2006 From: autarch at urth.org (Dave Rolsky) Date: Wed, 10 May 2006 11:57:59 -0500 (CDT) Subject: [Mpls-pm] Meeting Wed. In-Reply-To: References: <443AD8EF.5010405@peknet.com> <443ADA00.6090004@indecorous.com> <443ADC53.5070709@peknet.com> <444E446D.5070506@indecorous.com> <445F6AB4.2020906@indecorous.com> <4461E803.7050205@peknet.com> Message-ID: On Wed, 10 May 2006, Joshua ben Jore wrote: > On 5/10/06, Peter Karman wrote: >> Life has intervened on my behalf, and I can't make tonight's meeting. >> Sorry for the short notice. I assume since I haven't heard much noise >> about a meeting that others are not planning on it anyway (?) > > Ooh, er. Espresso Royale is is. I'll be there. Not til 7:30ish though. Me too. -Dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/ From matt at omega.org Wed May 17 05:18:45 2006 From: matt at omega.org (Matthew Johnson) Date: Wed, 17 May 2006 07:18:45 -0500 Subject: [Mpls-pm] [OT] Google releases AJAX toolkit Message-ID: <61D63AE2-73A0-4591-A1B4-27518F3F1A62@omega.org> We're bringing you Google Web Toolkit. GWT is a new publicly available software development tool that makes creating AJAX applications much easier. With GWT, you can develop and debug your own AJAX applications in Java code using the Java development tools of your choice. When you deploy your application to production, the GWT compiler simply translates your Java application to browser- compliant JavaScript and HTML. post: http://googleblog.blogspot.com/2006/05/making-ajax-development- easier.html webkit: http://code.google.com/webtoolkit/ From alan.miner at nwa.com Wed May 17 08:27:34 2006 From: alan.miner at nwa.com (Miner, Alan G) Date: Wed, 17 May 2006 10:27:34 -0500 Subject: [Mpls-pm] Secure scripts question Message-ID: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> The basic question is: Is there a better way to secure passwords in scripts? We have many perl and ksh scripts that do many things (Unix and Win). They call applications and must provide security credentials in that batch process. The credentials are kept in a file that only the user/group can read, and the passwords themselves are encrypted within that file. We would like to make the scripts "pure" perl, but the rub is that the crypto keys for the passwords have to be stored somewhere easily accessible. Does anyone have a more secure (yet workable) architecture/framework than this? I have searched various sites, blogs and archives and it always seems to boil down to where to store the encryption keys. Thanks! Alan From twists at gmail.com Wed May 17 11:19:37 2006 From: twists at gmail.com (Joshua ben Jore) Date: Wed, 17 May 2006 13:19:37 -0500 Subject: [Mpls-pm] Secure scripts question In-Reply-To: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> References: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> Message-ID: On 5/17/06, Miner, Alan G wrote: > I have searched various sites, blogs and archives and it always seems to > boil down to where to store the encryption keys. Yah sure. As far as I know, that's all it'll ever come down to with the tools we have now. Your script has to be able to access the information somehow. You could stick it in the interpreter, in some object code that gets loaded, in the perl source code, in a readable file, whatever. In all cases it's still somewhere. gpg handles this by forcing you to keep your private keys private to the user that's running it. It throws an error if your configuration is bad. Or are in the other common situation where the script is doing something for a user and you want to keep the credentials from the user? This sounds like the confused deputy problem that the Capabilities people like to bring up. Maybe you should consider writing your program in E instead of perl. Josh From gary.vollink at gmail.com Wed May 17 11:44:47 2006 From: gary.vollink at gmail.com (Gary Vollink) Date: Wed, 17 May 2006 13:44:47 -0500 Subject: [Mpls-pm] Secure scripts question In-Reply-To: References: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> Message-ID: On 5/17/06, Joshua ben Jore wrote: > On 5/17/06, Miner, Alan G wrote: > > I have searched various sites, blogs and archives and it always seems to > > boil down to where to store the encryption keys. > > Yah sure. As far as I know, that's all it'll ever come down to with > the tools we have now. Your script has to be able to access the > information somehow. You could stick it in the interpreter, in some > object code that gets loaded, in the perl source code, in a readable > file, whatever. In all cases it's still somewhere. Unless you have the capabilities to actually modify everything in the chain. Kerberos/LDAP style. User authenticates, gets ticket. Tool can use ticket in user's name. In the end - either a user is supplying the information live - at some point - or - your script has a location to find the keys. Alternatively, you throw caution to the wind, and run locally as root. From patm at visi.com Wed May 17 12:56:09 2006 From: patm at visi.com (Patrick McNamee) Date: Wed, 17 May 2006 14:56:09 -0500 Subject: [Mpls-pm] job opportunity In-Reply-To: <446B71C4.8020208@consumption.net> References: <20060401213410.GA24707@isis.visi.com> <446B71C4.8020208@consumption.net> Message-ID: <20060517195608.GB25154@isis.visi.com> No, the position has been filled. On Wed, May 17, 2006 at 01:56:04PM -0500, Torleiv Ringer wrote: > Patrick, > > Is this position still available? > > Torleiv Ringer > > Patrick McNamee wrote: > > >Holmes Corporation is looking for a programmer, someone who > >has the 'nix, Perl, Mason, MySQL, Apache, mod_perl, etc. > >skill set. > > > >If you have such skills and are in the market for a new job, > >contact me. The job is a full-time, regular-employee > >position, not freelance or contract. > > > >-- > >Patrick McNamee > >Holmes Corporation > >651-905-2636 (work) > >651-653-8446 (home) > >www.holmescorp.com From ken at mathforum.org Wed May 17 19:35:05 2006 From: ken at mathforum.org (Ken Williams) Date: Wed, 17 May 2006 21:35:05 -0500 Subject: [Mpls-pm] Secure scripts question In-Reply-To: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> References: <1A7B5FB9009EFE4E9F06F7960EAA8841018520DC@A3MSPJ60.pad.nwa.com> Message-ID: On May 17, 2006, at 10:27 AM, Miner, Alan G wrote: > The basic question is: Is there a better way to secure passwords in > scripts? > > We have many perl and ksh scripts that do many things (Unix and Win). > They call applications and must provide security credentials in that > batch process. The credentials are kept in a file that only the > user/group can read, and the passwords themselves are encrypted within > that file. Personally I usually skip that second part. If you're running on a secure enough operating system (e.g. your Unix stuff) then file permissions are secure and about as simple as things get. If you don't trust OS-level permissions to provide security, then encrypting the passwords is probably just giving a false sense of security. In a sense it does provide a kind of "two factor" security I suppose, but both factors really just boil down to OS-level security. -Ken From twists at gmail.com Wed May 24 08:50:46 2006 From: twists at gmail.com (Joshua ben Jore) Date: Wed, 24 May 2006 10:50:46 -0500 Subject: [Mpls-pm] OT: Mac help needed Message-ID: My dad's employer needs someone to help them fix some Macs that they're responsible for. Contact Jim Jore directly if you're interested. I'm sure it'd just be an afternoon of finding the buggy extension or something like that. Josh ---------- Forwarded message ---------- > From: Jim Jore > To: Joshua ben Jore > Subject: FW: New Tech Request: [TICKET #4144]: computer problems > Date: Tue, 23 May 2006 15:06:34 -0500 > > Any Mac Persons, Please > > Jim Jore > Network Engineer > MCT, CTT, MCSE, MCSA-M, A+, Network+. > Designs for Learning > 1000 Hamline Avenue North > Suite 100 > St. Paul, MN 55104 > Phone: 651-645-0200, x3008 > Fax: 651-645-0240 > E-mail: jjore at designlearn.netg > > -----Original Message----- > From: Nicole Paulbick [mailto:npaulbick at dugsiacademy.org] > Sent: Friday, May 19, 2006 3:10 PM > To: Tech Request Recipients > Subject: New Tech Request: [TICKET #4144]: computer problems > > *** ORGANIZATION: Dugsi > *** ORIGINATOR: Nicole Paulbick > *** PRIORITY: 2 - High (within one week) > > *** PROBLEM DESCRIPTION/JOB REQUEST: > NWEA testing has been going on all this week and everything has been > going pretty well with all of that. Besides the fact one of the > computers still won't let me into Test Taker (it did the first day, but > then decided it didn't want to work anymore). It keeps coming up with > the message 'A valid NTE database cannot be found at the specified > location /volumes/NWE_TESTING/Spring06_NTE. I tried getting rid of it > and putting it back on, but it didn't work. This is the least of my > problems though. > > In working on the cloning process with the Mac's for the last couple of > weeks it finally appeared as though I got 16 of the computers to do > exactly what we had wanted them to do. Well, at least the NWEA Test > Taker icons worked. By all appearences everything looks like it's set > up the way it's supposed to be. When you log out there are the > different accounts to go into (SMStudent, Dugsi Academy, SMTeacher, > SMAdmin and Other). SuccessMaker isn't working on any of the computers > now. It's been doing a couple of different things. Sometimes you can > get into the program, but when you try to go into either reading or math > it will completely freeze. Or sometimes the following error message > shows up when you try to get into SM: Can't get <> 1 of > application 'Finder'. So SuccessMaker doesn't work at all right now. > > Then there's the matter of the 6 computers that crashed during the > cloning process. Five of them have blank blue screens and one has a > blank gray screen. I can't get them to do anything. Then there's one > computer that the cloning process didn't work on and I have no idea why > it didn't work - the process went the way it was supposed to, but > nothing changed on the desktop and SuccessMaker doesn't work on this > computer at all anymore. > > I will be doing limited testing on the morning of 5/23 and I won't be > testing at all on 5/25 or 5/26 - I have to be back in the art room. The > computer lab will be empty these days (no regular classes) so that might > be a good time to try and work on these problems. > > Thank you!!! > > *** CURRENT STATUS: > Your technical support contact is in the process of responding to this > request. From cpj1 at visi.com Wed May 24 12:45:59 2006 From: cpj1 at visi.com (Chris) Date: Wed, 24 May 2006 14:45:59 -0500 (CDT) Subject: [Mpls-pm] Indirect reference/inheritance? Message-ID: Okay, I have 2 classes, one being a subclass of the other. package A sub foo { return; } package B use base(A); Package A has a subroutine that *should* manipulate a variable in the namespace of the involking object. That is, if B is a subclass of A, and B has %Foo, the subroutine in A should manipulate %B:Foo. However, my attempt at an indirect reference is failing. $class=ref($object) $var=$class."::Foo"; foreach $k (keys(%{$var})) { # do stuff } I'm stuck with perl 5.8.0 on this one. Any ideas what I'm screwing up? -------------------- Christopher Josephes cpj1 at visi.com From twists at gmail.com Wed May 24 12:54:41 2006 From: twists at gmail.com (Joshua ben Jore) Date: Wed, 24 May 2006 14:54:41 -0500 Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: On 5/24/06, Chris wrote: > > Any ideas what I'm screwing up? You're not using a tool like Class::Data::Inheritable. Perl does ISA lookups when you make class or object method calls. It doesn't have any builtin facility to find inherited class data. I haven't used that module since I've never thought I needed to use it. I suppose it works, I think I've used other things that required it and they seemed to work ok. Also, perl has a built in class called B. It'd be a terrible idea for you to name one of your classes that same thing. Go skim the docs for B and see if you *really* want to use that one. This is the same bug that people trip over when they name their class Test. That's another builtin. Josh From cpj1 at visi.com Wed May 24 13:03:13 2006 From: cpj1 at visi.com (Chris) Date: Wed, 24 May 2006 15:03:13 -0500 (CDT) Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: On Wed, 24 May 2006, Joshua ben Jore wrote: > Also, perl has a built in class called B. It'd be a terrible idea for > you to name one of your classes that same thing. Go skim the docs for > B and see if you *really* want to use that one. This is the same bug > that people trip over when they name their class Test. That's another > builtin. Uh, I only used the names "A" and "B" as examples..... > Josh > -------------------- Christopher Josephes cpj1 at visi.com From orderthruchaos at gmail.com Wed May 24 13:35:45 2006 From: orderthruchaos at gmail.com (Brett DiFrischia) Date: Wed, 24 May 2006 15:35:45 -0500 Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: How did you declare %Foo? If you used 'my' or 'local', %Free won't be in the namespace for the inherited class. Make sure you are using 'our'. Brett PS Sorry, Josh, didn't mean to send that to only you. On 5/24/06, Chris wrote: > > > Okay, I have 2 classes, one being a subclass of the other. > > package A > > sub foo { > return; > } > > package B > use base(A); > > > Package A has a subroutine that *should* manipulate a variable in the > namespace of the involking object. > > That is, if B is a subclass of A, and B has %Foo, the subroutine in A > should manipulate %B:Foo. > > However, my attempt at an indirect reference is failing. > > $class=ref($object) > $var=$class."::Foo"; > > foreach $k (keys(%{$var})) > { > # do stuff > } > > I'm stuck with perl 5.8.0 on this one. > > Any ideas what I'm screwing up? > > -------------------- > Christopher Josephes > cpj1 at visi.com > _______________________________________________ > Mpls-pm mailing list > Mpls-pm at pm.org > http://mail.pm.org/mailman/listinfo/mpls-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/mpls-pm/attachments/20060524/3a23d39e/attachment.html From ian at indecorous.com Wed May 24 13:36:53 2006 From: ian at indecorous.com (Ian Malpass) Date: Wed, 24 May 2006 15:36:53 -0500 Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: <4474C3E5.3000405@indecorous.com> Chris wrote: > However, my attempt at an indirect reference is failing. > > $class=ref($object) > $var=$class."::Foo"; > > foreach $k (keys(%{$var})) > { > # do stuff > } > > I'm stuck with perl 5.8.0 on this one. > > Any ideas what I'm screwing up? Are you sure $object contains a reference, and isn't just the class name? Because then ref would return undef and $var would be "::Foo". Ian PackageA.pm: package PackageA; use strict; use warnings; sub foo { my $self = shift; my $class = ref $self || $self; no strict 'refs'; for ( keys %{ $class . "::Foo" } ) { print $_, "\n"; } use strict 'refs'; } 1; PackageB.pm: package PackageB; use strict; use warnings; use base qw( PackageA ); %PackageB::Foo = ( a => 1, b => 2, ); 1; On the command line: % perl -I./ -MPackageB -e 'PackageB->foo();' a b % perl -I./ -MPackageB -e 'my $b = bless {}, "PackageB"; $b->foo();' a b From ken at mathforum.org Wed May 24 13:37:55 2006 From: ken at mathforum.org (Ken Williams) Date: Wed, 24 May 2006 15:37:55 -0500 Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: On May 24, 2006, at 2:45 PM, Chris wrote: > However, my attempt at an indirect reference is failing. > > $class=ref($object) > $var=$class."::Foo"; > > foreach $k (keys(%{$var})) > { > # do stuff > } Hi Chris, You didn't say how it's failing, but I'm guessing $class here isn't what you think it is. Try printing out the value of $class or $var in a debug message. Perhaps you want $class = $ISA[0] instead of $class = ref($object). Keep in mind that $object could be essentially any arbitrary subclass of B or A, and caring about its class name is Officially Evil. If that debug message doesn't shed light, try posting a full example with the error messages you're getting. -Ken From cpj1 at visi.com Wed May 24 13:58:38 2006 From: cpj1 at visi.com (Chris) Date: Wed, 24 May 2006 15:58:38 -0500 (CDT) Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: Figured it out. Despite using -cw, and "use warnings", the perl interpreter failed because of a value inside the hash with this regular expression. %Foo=( .... "field3" => "(\\d+)\\$", ) I had to remove one backslash in front of the dollar sign in the value. Then everything worked fine. After direct manipulation with variables within the package itself, the error came to light. I'm guessing a later version of perl would have done a better job of complaining. This drove me up the wall for about 2 hours. So the references I was using was actually okay. -------------------- Christopher Josephes cpj1 at visi.com From peter at peknet.com Wed May 24 14:03:58 2006 From: peter at peknet.com (Peter Karman) Date: Wed, 24 May 2006 16:03:58 -0500 Subject: [Mpls-pm] Indirect reference/inheritance? In-Reply-To: References: Message-ID: <4474CA3E.9000809@peknet.com> Was reading about this just yesterday here: http://perldoc.perl.org/perlbot.html See especially the section "CLASS CONTEXT AND THE OBJECT." The recommendation is to always put a reference to package vars in the object itself, to avoid the kind of problem you're experiencing. [ I realize this kind of response is annoying (e.g., "why don't you do it this way instead...") but as I am only the messenger, please don't shoot. ;) ] Chris scribbled on 5/24/06 2:45 PM: > Okay, I have 2 classes, one being a subclass of the other. > > package A > > sub foo { > return; > } > > package B > use base(A); > > > Package A has a subroutine that *should* manipulate a variable in the > namespace of the involking object. > > That is, if B is a subclass of A, and B has %Foo, the subroutine in A > should manipulate %B:Foo. > > However, my attempt at an indirect reference is failing. > > $class=ref($object) > $var=$class."::Foo"; > > foreach $k (keys(%{$var})) > { > # do stuff > } > > I'm stuck with perl 5.8.0 on this one. > > Any ideas what I'm screwing up? > > -------------------- > Christopher Josephes > cpj1 at visi.com > _______________________________________________ > Mpls-pm mailing list > Mpls-pm at pm.org > http://mail.pm.org/mailman/listinfo/mpls-pm > -- Peter Karman . http://peknet.com/ . peter at peknet.com From gypsy at freeq.com Fri May 26 07:50:49 2006 From: gypsy at freeq.com (Gypsy Rogers) Date: 26 May 2006 14:50:49 -0000 Subject: [Mpls-pm] Perl/Apache/CGI/Oracle Contract for Hire position Message-ID: <20060526145049.5313.qmail@implex.gypsy.org> Anyone looking for a job that is Perl/Apache/CGI/Oracle on a Contract for Hire basis? I'm interviewing for one next week and the recruiter I'm working with says she has 6 more positions just like it with the same company. Contact me offlist if you are interested and I'll forward your resume on to her. From joshua.mcadams at gmail.com Wed May 31 21:11:05 2006 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Wed, 31 May 2006 23:11:05 -0500 Subject: [Mpls-pm] YAPC::NA Message-ID: <49d805d70605312111r364c211cg60d5aabd0e050efb@mail.gmail.com> Hi there fellow Perl Mongers. I'm writing to remind you all that YAPC::NA is only a few weeks away. The conference will be held in Chicago June 26th through 28th and will feature four simultaneous sessions of Perl talks for three days in addition to a job fair, banquet, and auction. After the conference Damian Conway, Randal Schwartz, and brian d foy will be sticking around and conducting professional training classes and extremely reduced prices. This email is a little spammy (sorry about that), but I just wanted to remind you all about the conference and also ask for your help in promoting it so that we can fill up the few spots that are remaining. For more information check out http://www.yapcchicago.org. We invite you to put up posters: http://yapcchicago.org/yapc_poster.pdf http://yapcchicago.org/yapc_poster_white.pdf Or maybe a web banner: http://www.yapcchicago.org/yapc_banner_wide.jpg http://www.yapcchicago.org/yapc_banner_narrow.jpg Thank you for your help in making YAPC a success once again, Josh McAdams