From glim at mycybernet.net Sun Apr 10 08:48:00 2005 From: glim at mycybernet.net (Gerard Lim) Date: Sun Apr 10 09:06:58 2005 Subject: [CMI.PM] Reminder: Yet Another Perl Conference in Toronto, June 27 - 29 Message-ID: Yet Another YAPC::NA 2005 Conference Reminder --------------------------------------------- YAPC::NA 2005 is Yet Another Perl Conference, North America, this year to be held in downtown Toronto, Ontario, Canada, Mon - Wed 27 - 29 June 2005. Important Dates/Deadlines ------------------------- April 18 -- deadline for paper submissions May 12 -- last day of guaranteed accommodations YAPC::NA is a grassroots, all-volunteer conference. The speaker quality is high, the participants lively, and there are many extra social activities scheduled. We expect a bit over 400 people this year, and registration is proceeding faster this year than in the past. The registration cost is USD$85. Information on registration: http://yapc.org/America/register-2005.shtml http://yapc.org/America/registration-announcement-2005.txt Direct link to registration: http://donate.perlfoundation.org/index.pl?node=registrant%20info&conference_id=423 Want to be a speaker? Deadline for proposal submission is April 18, just over 1 week from now. Go to: http://yapc.org/America/cfp-2005.shtml Need accommodations in Toronto? Go to: http://yapc.org/America/accommodations-2005.shtml If you book before May 13 you will be guaranteed a hotel space. After that getting accommodations will become progressively more difficult. Prices we have arranged are in two different price ranges: approximately US$50 for a dorm room, US$72 for a decent hotel room. All accommodations are very nearby the conference venue. This message comes from the YAPC::NA 2005 organizers in Toronto.pm, http://to.pm.org/, on behalf of The Perl Foundation, http://www.perlfoundation.org/ We look forward to seeing you in Toronto! If you have any questions please contact na-help@yapc.org From jak at uiuc.edu Thu Apr 21 08:41:35 2005 From: jak at uiuc.edu (Jay A. Kreibich) Date: Thu Apr 21 08:41:43 2005 Subject: [CMI.PM] get function name? Message-ID: <20050421154135.GB14409@uiuc.edu> Anyone know if there is a way to get the current function name? For example: ---------------------------------------------------------------------- package myPkg; use strict; sub myFunc { my( $f ) = ?????; # want $f equal to "MyFunc" or "myPkg::myFunc" } 1; ---------------------------------------------------------------------- With '?????' being some contant var reference or symbol (e.g. a built-in var or something like '__PACKAGE__'. With an autoloaded function this information is avaliable in $AUTOLOAD, but I was wondering if anyone knows how to extract this in the context of a normal package function and/or method. -j -- Jay A. Kreibich | CommTech, Emrg Net Tech Svcs jak@uiuc.edu | Campus IT & Edu Svcs | University of Illinois at U/C From mike at mikero.com Thu Apr 21 08:56:51 2005 From: mike at mikero.com (Mike Rosulek) Date: Thu Apr 21 08:57:05 2005 Subject: [CMI.PM] get function name? In-Reply-To: <20050421154135.GB14409@uiuc.edu> References: <20050421154135.GB14409@uiuc.edu> Message-ID: <1114099011.11351.232418077@webmail.messagingengine.com> The CMI.PM list liiiiiiives ;) Try 'caller' -- it can look down the call stack to any depth (including depth 0, which gives the current stack frame) and tell you various useful thingies about the frames. sub myfunc { my $fname = (caller 0)[3]; print "$fname\n"; # will print "main::myfunc" } Cheers, Mike On Thu, 21 Apr 2005 10:41:35 -0500, "Jay A. Kreibich" said: > > Anyone know if there is a way to get the current function name? For > example: > > ---------------------------------------------------------------------- > > package myPkg; > use strict; > > sub myFunc > { > my( $f ) = ?????; > > # want $f equal to "MyFunc" or "myPkg::myFunc" > } > > 1; > > ---------------------------------------------------------------------- > > With '?????' being some contant var reference or symbol (e.g. a > built-in var or something like '__PACKAGE__'. > > With an autoloaded function this information is avaliable in > $AUTOLOAD, but I was wondering if anyone knows how to extract this > in the context of a normal package function and/or method. > > -j > > -- > Jay A. Kreibich | CommTech, Emrg Net Tech Svcs > jak@uiuc.edu | Campus IT & Edu Svcs > | University of Illinois at U/C > _______________________________________________ > Champaign-Urbana mailing list > Champaign-Urbana@pm.org > http://mail.pm.org/mailman/listinfo/champaign-urbana From lewart at uiuc.edu Thu Apr 21 09:01:17 2005 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Thu Apr 21 09:01:27 2005 Subject: [CMI.PM] get function name? In-Reply-To: <20050421154135.GB14409@uiuc.edu> References: <20050421154135.GB14409@uiuc.edu> Message-ID: <4267CE4D.2090209@uiuc.edu> Jay, > Anyone know if there is a way to get the current function name? For > example: Yes; see (the suboptimally documented) caller function: http://perldoc.perl.org/functions/caller.html > sub myFunc > { > my( $f ) = ?????; > # want $f equal to "MyFunc" or "myPkg::myFunc" > } > 1; my $f = (caller(0))[3]; # myPkg::myFunc Cheers, Dan http://cmi.pm.org/ From jak at uiuc.edu Thu Apr 21 10:52:26 2005 From: jak at uiuc.edu (Jay A. Kreibich) Date: Thu Apr 21 10:52:36 2005 Subject: [CMI.PM] get function name? In-Reply-To: <4267CE4D.2090209@uiuc.edu> References: <20050421154135.GB14409@uiuc.edu> <4267CE4D.2090209@uiuc.edu> Message-ID: <20050421175226.GB14590@uiuc.edu> On Thu, Apr 21, 2005 at 11:01:17AM -0500, Daniel S. Lewart scratched on the wall: > > Anyone know if there is a way to get the current function name? For > > example: > > Yes; see (the suboptimally documented)... In other words, like most of Perl. > ...caller function: > http://perldoc.perl.org/functions/caller.html Perfect. Of course, the index of _Programming Perl_ would have never gotten me there, nor is this mentioned in the Autoloading section (despite it being very similar to some of the magic AUTOLOAD methods do), but I guess that's why this list is here. -j -- Jay A. Kreibich | CommTech, Emrg Net Tech Svcs jak@uiuc.edu | Campus IT & Edu Svcs | University of Illinois at U/C From mitch at ncsa.uiuc.edu Thu Apr 21 16:29:35 2005 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Apr 21 16:26:24 2005 Subject: [CMI.PM] cgi-lib.pl "not found in @INC"??? In-Reply-To: <1114099011.11351.232418077@webmail.messagingengine.com> References: <20050421154135.GB14409@uiuc.edu> <20050421154135.GB14409@uiuc.edu> Message-ID: <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> Hi -- It's feast or famine, Perlmongers! Having some "require" trouble that seems to think I want a module, not just one file. This code: #!/usr/bin/perl -w use strict; use HTML::Calendar::Simple; use HTML::CalendarMonthSimple; my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne ""); if ($usingcgi) { require "cgi-bin.pl"; } if ($usingcgi) { # &ReadParse; } Produces this error in /var/log/httpd/error_log: [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Can't locate cgi-bin.pl in @INC (@INC contains: /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /var/www/cgi-bin/iemscal.pl line 11. [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Premature end of script headers: iemscal.pl Here's the directory info: [mitch@jhereg cgi-bin]$ pwd /var/www/cgi-bin [mitch@jhereg cgi-bin]$ ls -l total 60 -rwxrwxr-x 1 mitch apache 3451 Oct 6 2004 caltest.pl* -rw-rw-r-- 1 mitch mitch 4152 Apr 21 16:52 cgi-lib-iems_old.pl -rw-rw-r-- 1 mitch mitch 15078 Apr 21 18:08 cgi-lib.pl -rwxrwxr-x 1 mitch mitch 2815 Apr 21 18:20 iemscal.pl* Why does it think I want to use a module here, instead of just using the local cgi-bin.pl file? Thanks! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From lewart at uiuc.edu Thu Apr 21 16:37:51 2005 From: lewart at uiuc.edu (Daniel S. Lewart) Date: Thu Apr 21 16:38:00 2005 Subject: [CMI.PM] cgi-lib.pl "not found in @INC"??? In-Reply-To: <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> References: <20050421154135.GB14409@uiuc.edu> <20050421154135.GB14409@uiuc.edu> <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> Message-ID: <4268394F.50008@uiuc.edu> Mitch, et al, > Hi -- It's feast or famine, Perlmongers! Mmmmm ... Perl feast! > Having some "require" trouble that seems to think I want a module, not just > one file. > This code: > #!/usr/bin/perl -w > use strict; > use HTML::Calendar::Simple; > use HTML::CalendarMonthSimple; > my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne ""); > if ($usingcgi) { > require "cgi-bin.pl"; > } Gack! Catch up with the rest of the world and replace these with: use CGI qw/:standard/; > if ($usingcgi) { > # &ReadParse; > } > Produces this error in /var/log/httpd/error_log: > [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Can't locate > cgi-bin.pl in @INC (@INC contains: > ... > Why does it think I want to use a module here, instead of just using the > local cgi-bin.pl file? Two reasons: 1) The current directory (".") is not part of @INC. 2) Modules do not belong in a cgi-bin directory Cheers, Dan http://cmi.pm.org/ From mitch at ncsa.uiuc.edu Thu Apr 21 16:48:19 2005 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Apr 21 16:45:31 2005 Subject: [CMI.PM] cgi-lib.pl "not found in @INC"??? In-Reply-To: <200504212330.j3LNUif8015470@arun.groogroo.com> References: <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> Message-ID: <3.0.5.32.20050421184819.05061d70@pop.ncsa.uiuc.edu> No joy here. Still produces the same result. Mitch At 06:30 PM 4/21/2005 -0500, Arun Bhalla wrote: > That's easy. It's a little typo -- change that to: > require 'cgi-lib.pl'; > > cheers, > Arun > > Mitch Kutzko writes: > > Hi -- It's feast or famine, Perlmongers! > > > > > > Having some "require" trouble that seems to think I want a module, not just > > one file. > > > > This code: > > > > #!/usr/bin/perl -w > > > > use strict; > > > > use HTML::Calendar::Simple; > > use HTML::CalendarMonthSimple; > > > > my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne ""); > > if ($usingcgi) { > > require "cgi-bin.pl"; > > } > > > > if ($usingcgi) { > > # &ReadParse; > > } > > > > > > Produces this error in /var/log/httpd/error_log: > > > > [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Can't locate > > cgi-bin.pl in @INC (@INC contains: > > /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 > > /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 > > /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 > > /usr/lib/perl5/site_perl > > /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > > /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 > > /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 > > /usr/lib/perl5/vendor_perl .) at /var/www/cgi-bin/iemscal.pl line 11. > > [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Premature end of > > script headers: iemscal.pl > > > > > > Here's the directory info: > > > > [mitch@jhereg cgi-bin]$ pwd > > /var/www/cgi-bin > > [mitch@jhereg cgi-bin]$ ls -l > > total 60 > > -rwxrwxr-x 1 mitch apache 3451 Oct 6 2004 caltest.pl* > > -rw-rw-r-- 1 mitch mitch 4152 Apr 21 16:52 cgi-lib-iems_old.pl > > -rw-rw-r-- 1 mitch mitch 15078 Apr 21 18:08 cgi-lib.pl > > -rwxrwxr-x 1 mitch mitch 2815 Apr 21 18:20 iemscal.pl* > > > > > > Why does it think I want to use a module here, instead of just using the > > local cgi-bin.pl file? > > > > Thanks! > > > > Mitch > > -- > > Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 > > http://hobbes.ncsa.uiuc.edu/ > > _______________________________________________ > > Champaign-Urbana mailing list > > Champaign-Urbana@pm.org > > http://mail.pm.org/mailman/listinfo/champaign-urbana > > > > -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From mitch at ncsa.uiuc.edu Thu Apr 21 16:53:56 2005 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Apr 21 16:50:38 2005 Subject: [CMI.PM] cgi-lib.pl "not found in @INC"??? In-Reply-To: <4268394F.50008@uiuc.edu> References: <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> <20050421154135.GB14409@uiuc.edu> <20050421154135.GB14409@uiuc.edu> <3.0.5.32.20050421182935.05061d70@pop.ncsa.uiuc.edu> Message-ID: <3.0.5.32.20050421185356.05061d70@pop.ncsa.uiuc.edu> At 06:37 PM 4/21/2005 -0500, Daniel S. Lewart wrote: > Mitch, et al, > > > Hi -- It's feast or famine, Perlmongers! > > Mmmmm ... Perl feast! *heh* > > Having some "require" trouble that seems to think I want a module, not just > > one file. > > > This code: > > > #!/usr/bin/perl -w > > > use strict; > > > use HTML::Calendar::Simple; > > use HTML::CalendarMonthSimple; > > > my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne ""); > > if ($usingcgi) { > > require "cgi-bin.pl"; > > } > > Gack! Catch up with the rest of the world and replace these with: > use CGI qw/:standard/; I want to use the cgi-bin.pl routines to validate and interpret the arguments passed in via the URL. Removing the 'require' and replacing it with use CGI qw/:standard/; does get rid of offending reference, of course, but at the expense of not being able to use any of the cgi-lib.pl code. Can you explain what I need to do here with something more useful than "Gack!"? > > if ($usingcgi) { > > # &ReadParse; > > } > > > Produces this error in /var/log/httpd/error_log: > > [Thu Apr 21 18:21:00 2005] [error] [client 69.212.106.31] Can't locate > > cgi-bin.pl in @INC (@INC contains: > > ... > > > Why does it think I want to use a module here, instead of just using the > > local cgi-bin.pl file? > > Two reasons: > 1) The current directory (".") is not part of @INC. > 2) Modules do not belong in a cgi-bin directory I'm trying to work with a single file reference here -- I'm not *trying* to include a module, Dan. Any ideas? Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From mitch at ncsa.uiuc.edu Thu Apr 21 17:16:46 2005 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Apr 21 17:13:28 2005 Subject: [CMI.PM] cgi-lib.pl "not found in @INC"??? In-Reply-To: <200504220005.j3M056pV016186@arun.groogroo.com> References: <3.0.5.32.20050421185356.05061d70@pop.ncsa.uiuc.edu> Message-ID: <3.0.5.32.20050421191646.05061d70@pop.ncsa.uiuc.edu> At 07:05 PM 4/21/2005 -0500, Arun Bhalla wrote: > You at least changed it to cgi-*lib*.pl, right? The cgi-bin.pl is > the typo, and you keep repeating that in your emails, too. > > If you need to you might want to make the directory explicit with > use lib '/var/www/cgi-bin'; > before the require line, or even > push(@INC, '/var/www/cgi-bin'); > They're similar, but the former is executed at compile-time, and the latter is executed at run-time. > > Good luck, > Arun Extra cookies to Arun! :-) I immediately noticed that my example used double quotes, while yours used single quotes. I'm so used to it being simple, syntactical stuff like that that I totally missed the fact that I brain-o'd the difference between "cgi-bin" and "cgi-lib". Doh. :-) Thanks, Arun!! Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From mitch at ncsa.uiuc.edu Thu Apr 21 19:21:04 2005 From: mitch at ncsa.uiuc.edu (Mitch Kutzko) Date: Thu Apr 21 19:17:49 2005 Subject: [CMI.PM] Next meeting? Message-ID: <3.0.5.32.20050421212104.05061d70@pop.ncsa.uiuc.edu> Hey -- As long as it's Feast Day for Perlmongers, I figured I'd write an email and ask when we're having our next meeting?? Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ From BPrice at atgf.com Fri Apr 22 07:59:09 2005 From: BPrice at atgf.com (Price, Bob) Date: Fri Apr 22 07:58:23 2005 Subject: [CMI.PM] Next meeting? Message-ID: <7B1970F59CFD5A48AFECBD7996812E4901FBFCEC@chi-msg-01.atgf.com> Well, lookie there, I'm actually not the one to send out a meeting request for a change ;) Bob Price Information Services - Senior Network Engineer ATTORNEYS' TITLE GUARANTY FUND, INC. 217.403.0142 ~ 800.252.5206, ext. 2142 -----Original Message----- From: champaign-urbana-bounces@pm.org [mailto:champaign-urbana-bounces@pm.org] On Behalf Of Mitch Kutzko Sent: Thursday, April 21, 2005 9:21 PM To: CU Perlmongers Subject: [CMI.PM] Next meeting? Hey -- As long as it's Feast Day for Perlmongers, I figured I'd write an email and ask when we're having our next meeting?? Mitch -- Mitch Kutzko | mitch@dast.nlanr.net | mitch@ncsa.uiuc.edu | 217-333-1199 http://hobbes.ncsa.uiuc.edu/ _______________________________________________ Champaign-Urbana mailing list Champaign-Urbana@pm.org http://mail.pm.org/mailman/listinfo/champaign-urbana