From david_dick at iprimus.com.au Tue Jul 1 22:55:16 2003 From: david_dick at iprimus.com.au (david_dick@iprimus.com.au) Date: Wed Aug 4 00:02:57 2004 Subject: Meeting tonite? Message-ID: <200307020355.h623t5b25867@mail.pm.org> Scott, is there a pm meeting tonight, or is my memory just bad? Uru -Dave From scottp at dd.com.au Tue Jul 1 23:32:03 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: Meeting tonite? In-Reply-To: <200307020355.h623t5b25867@mail.pm.org> Message-ID: <21376D47-AC46-11D7-BB49-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nope :-) 2nd Wednesday of the month - so coming up next Wednesday Scott On Wednesday, Jul 2, 2003, at 13:55 Australia/Melbourne, david_dick@iprimus.com.au wrote: > Scott, is there a pm meeting tonight, or is my memory just bad? > Uru > -Dave > > > - -- Scott Penrose Open source developer http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: Open sauce usually ends up never coming out (of the bottle). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/AmBHDCFCcmAm26YRAhmJAKCFaATz0N6pebJnCHIiGrLyFsuMfQCfVbho FbWw4hlMBhFT0prwLS3xmxE= =ej/x -----END PGP SIGNATURE----- From 237877 at bigfoot.com Wed Jul 2 01:49:42 2003 From: 237877 at bigfoot.com (237877@bigfoot.com) Date: Wed Aug 4 00:02:57 2004 Subject: Copy DVD's to a standard CD - without a DVD Burner 237877 Message-ID: <200307020527.h625Rvb26912@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030702/1ff37692/attachment.htm From 65eolemumn at bellatlantic.net Thu Jul 3 03:47:05 2003 From: 65eolemumn at bellatlantic.net (Kristi Tabor) Date: Wed Aug 4 00:02:57 2004 Subject: Looking For A Crisis Proof Investment? mw udeahdzluon Message-ID: <7h-4$x$580$677j-$-8e5@5mg7.h6.rl920> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030703/3c2055ab/attachment.htm From vmpusbzm at yahoo.com Thu Jul 3 03:47:26 2003 From: vmpusbzm at yahoo.com (Woodrow Carey) Date: Wed Aug 4 00:02:57 2004 Subject: Frustrated Watching The Stock Market? jz hizrye Message-ID: An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030703/509f899a/attachment.htm From brendon.oliver at redsheriff.com Thu Jul 3 20:21:21 2003 From: brendon.oliver at redsheriff.com (Brendon Oliver) Date: Wed Aug 4 00:02:57 2004 Subject: Modperl query Message-ID: <200307041121.21864.brendon.oliver@redsheriff.com> Hi all, I have a few perl modules which are loaded up when apache starts (ie. in httpd.conf: PerlScript /path/to/startup.pl where startup.pl "use"s a number of modules). Now, a couple of these modules have BEGIN blocks which query some postgresql database tables, then using the query results, dynamically create subroutines (and constants) by manipulating the perl symbol table. This all works fine - these subs are visible to all other modules which need them, and are shared across all httpd processes. If the contents of table X changes later on, I could re-execute the code from the BEGIN block which would recreate the dynamically-generated subroutines. So there's the query: am I right in presuming that the re-loaded subs would only be visible in the httpd process in which this executes? I expect that because the other httpd processes were forked by apache _after_ the modules were loaded, the only way to get this table change recognised by all processes would be to restart apache? Thoughts anyone? Thanks & regards, - Brendon. -- Getting the job done is no excuse for not following the rules. Corollary: Following the rules will not get the job done. 11:06:36 up 7 days, 2:45, 6 users, load average: 2.00, 1.81, 1.66 From david_dick at iprimus.com.au Fri Jul 4 04:45:24 2003 From: david_dick at iprimus.com.au (David Dick) Date: Wed Aug 4 00:02:57 2004 Subject: Modperl query In-Reply-To: <200307041121.21864.brendon.oliver@redsheriff.com> References: <200307041121.21864.brendon.oliver@redsheriff.com> Message-ID: <3F054CB4.8070100@iprimus.com.au> AFAIK, the short answer is yes, the reloaded subs would only be visible in the httpd process that re-executes the code in the BEGIN block. Is this a problem? Do the httpd processes check table X at the start of every response phase, or are you using signals and need to know if you need to signal one mod_perl process or every one, or have i missed the point entirely? What do you want to happen? :) Uru -Dave Brendon Oliver wrote: >Hi all, > >I have a few perl modules which are loaded up when apache starts (ie. in >httpd.conf: PerlScript /path/to/startup.pl where startup.pl "use"s a number >of modules). > >Now, a couple of these modules have BEGIN blocks which query some postgresql >database tables, then using the query results, dynamically create subroutines >(and constants) by manipulating the perl symbol table. This all works fine - >these subs are visible to all other modules which need them, and are shared >across all httpd processes. > >If the contents of table X changes later on, I could re-execute the code from >the BEGIN block which would recreate the dynamically-generated subroutines. > >So there's the query: am I right in presuming that the re-loaded subs would >only be visible in the httpd process in which this executes? I expect that >because the other httpd processes were forked by apache _after_ the modules >were loaded, the only way to get this table change recognised by all >processes would be to restart apache? > >Thoughts anyone? > >Thanks & regards, > >- Brendon. > > From david_dick at iprimus.com.au Fri Jul 4 04:47:30 2003 From: david_dick at iprimus.com.au (David Dick) Date: Wed Aug 4 00:02:57 2004 Subject: Modperl query In-Reply-To: <200307041121.21864.brendon.oliver@redsheriff.com> References: <200307041121.21864.brendon.oliver@redsheriff.com> Message-ID: <3F054D32.5040009@iprimus.com.au> AFAIK, the short answer is yes, the reloaded subs would only be visible in the httpd process that re-executes the code in the BEGIN block. Is this a problem? Do the httpd processes check table X at the start of every response phase, is it enuff to simply wipe the old modules from memory and re-require them, or are you using signals and need to know if you need to signal one mod_perl process or every one, or have i missed the point entirely? What do you want to happen? :) Uru -Dave Brendon Oliver wrote: >Hi all, > >I have a few perl modules which are loaded up when apache starts (ie. in >httpd.conf: PerlScript /path/to/startup.pl where startup.pl "use"s a number >of modules). > >Now, a couple of these modules have BEGIN blocks which query some postgresql >database tables, then using the query results, dynamically create subroutines >(and constants) by manipulating the perl symbol table. This all works fine - >these subs are visible to all other modules which need them, and are shared >across all httpd processes. > >If the contents of table X changes later on, I could re-execute the code from >the BEGIN block which would recreate the dynamically-generated subroutines. > >So there's the query: am I right in presuming that the re-loaded subs would >only be visible in the httpd process in which this executes? I expect that >because the other httpd processes were forked by apache _after_ the modules >were loaded, the only way to get this table change recognised by all >processes would be to restart apache? > >Thoughts anyone? > >Thanks & regards, > >- Brendon. > > From david_dick at iprimus.com.au Sun Jul 6 23:07:42 2003 From: david_dick at iprimus.com.au (david_dick@iprimus.com.au) Date: Wed Aug 4 00:02:57 2004 Subject: DBD::ODBC on linux Message-ID: <200307070407.h6747UH15580@mail.pm.org> G'day all, Nearly tearing proverbial hair out here. There are weird and wonderful reasons I need to do this, but skipping directly to the problem, has anyone had a successful experience of connecting via DBD::ODBC from a script on a linux box to a mysql database? If so, what is the format of the dsn? I have installed the mysql odbc driver, the iodbc driver manager and just can't get DBD::ODBC to understand what i am trying to do. :) Uru -Dave From 237997 at hotmail.com Tue Jul 8 06:15:29 2003 From: 237997 at hotmail.com (237997@hotmail.com) Date: Wed Aug 4 00:02:57 2004 Subject: 237997 IM recording 114382414 Message-ID: 5827444-57D6325C-21741F75-4BDB9A2-47A5FC24@delphi.com An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030708/6b2f009a/attachment.htm From scottp at dd.com.au Tue Jul 8 01:44:14 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: Perl Mongers Meeting - Wednesday 9th (tomorrow) - 6:30 pm - Short Talks Message-ID: <96AF6DB8-B10F-11D7-A15B-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tomorrow we will be doing a number of short talks at Perl Mongers from Graeme Cross, Crashkat, Martin Ellis and Scott Penrose. * Perl and WX - Cross Platform Graphics and MORE ! * Test:: is not a dirty word * Perl and Tail Recursion - it is possible * Require file, Read/Eval file, do file - performance * Inline::Guile - embedding scheme / lisp in your perl * Filter::Debug - an example filter to remove debugging code when not in debug mode. * Attribute::Deprecated2 - how to make your own Attribute handler and why. * Proc::Daemon - Make me a daemon (with a catch) Where: myinternet, Level 8, Blackwood Street, North Melbourne When: 6:30pm Wednesday 9th of July 2003 And of course, followed by Dinner at the Pub. See you there. Scott - -- Scott Penrose Open source developer http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: Open sauce usually ends up never coming out (of the bottle). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/CmhBDCFCcmAm26YRAhE0AJ4u7xNk++ewacK+PzvozztKSkCIHwCeIHZG YWVO//0KRmzaYSjmv9rB9y4= =1nXr -----END PGP SIGNATURE----- From scottp at dd.com.au Wed Jul 9 09:18:11 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 Message-ID: <2BFDB6E3-B218-11D7-BF41-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey Dudes, One of the things that Damian Conway mentioned during the last talk on Perl 6 was that much of what perl does in core will most likely be done by perl code itself. Martin Ellis last night demonstrated writing combinations of require, do, use and no based on each other. In the end (apart from the fact that use can not be directly done in perl without a BEGIN block, ie: changing your source) each only depended on eval. We already know that for and foreach are basically the same - but we can even go further and make them if and goto - which is what they will end up being at the bytecode anyway. I was looking through the perl6 sites, lists etc, to see if anyone has started work on such a project. The theory being, if we can write what we can of perl5 in perl5, using the least primitives we can, then converting those to perl6 should not be hard, and then converting only those primitives to parrot is of course easier than the whole of perl... Anyone heard, seen anything on this idea? Scott - -- Scott Penrose Welcome to the Digital Dimension http://www.dd.com.au/ scottp@dd.com.au Dismaimer: Contents of this mail and signature are bound to change randomly. Whilst every attempt has been made to control said randomness, the author wishes to remain blameless for the number of eggs that damn chicken laid. Oh and I don't want to hear about butterflies either. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/DCQnDCFCcmAm26YRAhg3AKCPtcmKbxxz4k160p5h8KgQqgWqOgCgltnv 8lCuZ5rWmpABrkAsK2/rsH4= =EGir -----END PGP SIGNATURE----- From stas at stason.org Thu Jul 10 03:10:20 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 In-Reply-To: <2BFDB6E3-B218-11D7-BF41-003065B58CF8@dd.com.au> References: <2BFDB6E3-B218-11D7-BF41-003065B58CF8@dd.com.au> Message-ID: <3F0D1F6C.4020108@stason.org> Scott Penrose wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hey Dudes, > > One of the things that Damian Conway mentioned during the last talk on > Perl 6 was that much of what perl does in core will most likely be done > by perl code itself. > > Martin Ellis last night demonstrated writing combinations of require, > do, use and no based on each other. In the end (apart from the fact that > use can not be directly done in perl without a BEGIN block, ie: changing > your source) each only depended on eval. > > We already know that for and foreach are basically the same - but we can > even go further and make them if and goto - which is what they will end > up being at the bytecode anyway. > > I was looking through the perl6 sites, lists etc, to see if anyone has > started work on such a project. The theory being, if we can write what > we can of perl5 in perl5, using the least primitives we can, then > converting those to perl6 should not be hard, and then converting only > those primitives to parrot is of course easier than the whole of perl... > > Anyone heard, seen anything on this idea? Say welcome to Ponie: http://www.poniecode.org/ > Scott > - -- Scott Penrose > Welcome to the Digital Dimension > http://www.dd.com.au/ > scottp@dd.com.au > > Dismaimer: Contents of this mail and signature are bound to change > randomly. Whilst every attempt has been made to control said randomness, > the author wishes to remain blameless for the number of eggs that damn > chicken laid. Oh and I don't want to hear about butterflies either. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (Darwin) > Comment: For info see http://www.gnupg.org > > iD8DBQE/DCQnDCFCcmAm26YRAhg3AKCPtcmKbxxz4k160p5h8KgQqgWqOgCgltnv > 8lCuZ5rWmpABrkAsK2/rsH4= > =EGir > -----END PGP SIGNATURE----- -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From simontaylor at fastmail.fm Thu Jul 10 15:33:59 2003 From: simontaylor at fastmail.fm (Simon Taylor) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 Message-ID: <20030710203359.A9DD572751@smtp.us2.messagingengine.com> Hello Scott, > I was looking through the perl6 sites, lists etc, to see if anyone has > started work on such a project. The theory being, if we can write what > we can of perl5 in perl5, using the least primitives we can, then > converting those to perl6 should not be hard, and then converting only > those primitives to parrot is of course easier than the whole of perl... > > Anyone heard, seen anything on this idea? Someone (I forget who), announced a similar undertaking here at OSCON 2003. I believe that the plan is to make perl5 the second non-trivial language ported to parrot, (there is a working BASIC implementation already in place). I'll see what more I can find out about it.... Regards, Simon -- Simon Taylor simontaylor@fastmail.fm (simon@unisolve.com.au) -- http://www.fastmail.fm - Consolidate POP email and Hotmail in one place From 238058 at delphi.com Fri Jul 11 08:35:19 2003 From: 238058 at delphi.com (238058@delphi.com) Date: Wed Aug 4 00:02:57 2004 Subject: Is your cock to small? 238058 Message-ID: <200307110021.h6B0Lna22543@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030711/89bca8ff/attachment.htm From scottp at dd.com.au Thu Jul 10 21:16:58 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 In-Reply-To: <20030710203359.A9DD572751@smtp.us2.messagingengine.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I believe that the plan is to make perl5 the second non-trivial > language > ported to parrot, (there is a working BASIC implementation already in > place). > > I'll see what more I can find out about it.... Stas pointed out it is called ponie. http://www.poniecode.org/ What ponie is doing is to take the Perl 5 Core and make it generate Parrot. It also has some extra compatibility layers for shared objects in C to be linked in in the current XS style. What I was more thinking about is Perl 6. Which is a new language. However most of Perl 6 is still Perl 5 - but the plan is to write as much of it as possible in Perl 6. Thus you may need to write 'eval' but you then do not need to write 'do' or 'require' as they can be written with a file read and an eval. What I was wondering, is there anyone trying to write perl in primitives - so that there is less actual work to do to write perl 6. The problem is bootstrapping - as you must have perl 6 to do this. However I though, since perl 6 will be similar to perl 5, maybe many of these language extensions (well, core in perl 5, but maybe they will be called extensions in 6) can be written now in perl 5 - tested, and then ported to perl 6 over time. What it would also indicate is what primitives MUST exist in perl 6. Thus the minimum set will then be defined. And then only that minimum set need be converted into Parrot. None of this actually effects the real hard work - which is of course the parser of the new language itself. What I am wondering is - where would this fit in - it at all in Perl 6 development? Scott - -- Scott Penrose Anthropomorphic Personification Expert http://search.cpan.org/search?author=SCOTT scott@cpan.org Dismaimer: While every attempt has been made to make sure that this email only contains zeros and ones, there has been no effort made to guarantee the quantity or the order. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/Dh4dDCFCcmAm26YRAmPUAJ9yRS4h4jQpA8yWRSU75qyENYxcLwCeMe7Q ksWHjqilhylZ15GLKt2W1n4= =e314 -----END PGP SIGNATURE----- From stas at stason.org Thu Jul 10 22:09:31 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 In-Reply-To: References: Message-ID: <3F0E2A6B.5080500@stason.org> Scott Penrose wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > >> I believe that the plan is to make perl5 the second non-trivial language >> ported to parrot, (there is a working BASIC implementation already in >> place). >> >> I'll see what more I can find out about it.... > > > Stas pointed out it is called ponie. > > http://www.poniecode.org/ > > What ponie is doing is to take the Perl 5 Core and make it generate Parrot. > It also has some extra compatibility layers for shared objects in C to > be linked in in the current XS style. AFAIK, it's the other way around. Use parrot to write perl-5.10. > What I was more thinking about is Perl 6. Which is a new language. > However most of Perl 6 is still Perl 5 - but the plan is to write as > much of it as possible in Perl 6. Thus you may need to write 'eval' but > you then do not need to write 'do' or 'require' as they can be written > with a file read and an eval. > > What I was wondering, is there anyone trying to write perl in primitives > - so that there is less actual work to do to write perl 6. > > The problem is bootstrapping - as you must have perl 6 to do this. > However I though, since perl 6 will be similar to perl 5, maybe many of > these language extensions (well, core in perl 5, but maybe they will be > called extensions in 6) can be written now in perl 5 - tested, and then > ported to perl 6 over time. > > What it would also indicate is what primitives MUST exist in perl 6. > Thus the minimum set will then be defined. And then only that minimum > set need be converted into Parrot. > > None of this actually effects the real hard work - which is of course > the parser of the new language itself. > > What I am wondering is - where would this fit in - it at all in Perl 6 > development? > > Scott > - -- Scott Penrose > Anthropomorphic Personification Expert > http://search.cpan.org/search?author=SCOTT > scott@cpan.org > > Dismaimer: While every attempt has been made to make sure that this > email only contains zeros and ones, there has been no effort made to > guarantee the quantity or the order. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (Darwin) > Comment: For info see http://www.gnupg.org > > iD8DBQE/Dh4dDCFCcmAm26YRAmPUAJ9yRS4h4jQpA8yWRSU75qyENYxcLwCeMe7Q > ksWHjqilhylZ15GLKt2W1n4= > =e314 > -----END PGP SIGNATURE----- -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From scottp at dd.com.au Thu Jul 10 22:11:45 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 In-Reply-To: <3F0E2A6B.5080500@stason.org> Message-ID: <66DD0451-B34D-11D7-BF41-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, Jul 11, 2003, at 13:09 Australia/Melbourne, Stas Bekman wrote: > Scott Penrose wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >>> I believe that the plan is to make perl5 the second non-trivial >>> language >>> ported to parrot, (there is a working BASIC implementation already in >>> place). >>> >>> I'll see what more I can find out about it.... >> Stas pointed out it is called ponie. >> http://www.poniecode.org/ >> What ponie is doing is to take the Perl 5 Core and make it generate >> Parrot. >> It also has some extra compatibility layers for shared objects in C >> to be linked in in the current XS style. > > AFAIK, it's the other way around. Use parrot to write perl-5.10. OOOOHHHH.... Now that would be way cool - doesn't look like it from the site notes though. It seems that it is going to use Perl 5 engine (starting with the current code) and strip out the backend vm and things that specifically create code for the VM and replace the VM with Parrot and parrot opcodes rather than the Perl 5 VM opcodes. But maybe I am reading that wrong. Either way - I am excited :-) Scott - -- Scott Penrose VP in charge of Pancakes http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/Dir0DCFCcmAm26YRApiNAJ9sLPsiDNAKAkFqtaEXIyZYE31cqQCghp/i q1g551Ji5xN4bNiVST9YwBk= =gfE7 -----END PGP SIGNATURE----- From melbourne.pm at bowman.bs Fri Jul 11 03:07:04 2003 From: melbourne.pm at bowman.bs (Brad Bowman) Date: Wed Aug 4 00:02:57 2004 Subject: Another Debugging Filter Message-ID: <1057910823.813.89.camel@oxum> Hi, Here's another source filter for debugging. It (ab)uses the fact that it's a macro a bit more by using variables in the "calling" scope, printing their names, etc. The tests give you some idea of how to use it. One notable difference with the presented filter is that the substitution is ' ; ' rather that '0'. I might change that though. Also, I don't use parens matching regexps. Are there any reasons not to? It also tries to be Apache savvy. It probably should have verbosity levels added and something I've been thinking about is: while (<>) { $result = some_function($_); dbg($result) if its_one_the_first_five_iterations(); } The first sketch is in C.pm. Should I CPAN it in some form? Brad -- Through you life advance daily, becoming more skillful than yesterday, more skillful than today. This is never-ending. -- Hagakure http://bowman.bs/hagakure/ -------------- next part -------------- package SD::Debug; =pod =head1 NAME SD::Debug - Debugging macros with compile and run time control =head1 SYNOPSIS #BEGIN { $SD::Debug::FILTER_DEBUG =1 } use SD::Debug; $variable = 12; dbg($variable); # dbg: 12 dbg('Some message'); # dbg: Some message dbg('No interpolation $variable'); # dbg: No interpolation $variable dbg("Interpolates $variable"); # dbg: Interpolates 12 dbg('six','extra'); # you probably want dbd([]) # dbg: sixextra # NOTE this is dbd not dbg (d for dump) my $array = ['six','extra']; dbd($array); # use dbd with a ref # dbd: $array = [ # 'six', # 'extra' # ] dbd($variable); # dbd: $variable = 12 # NOTE this is dbx not dbg (x for execute...) dbx($variable+2); # dbx: $variable+2 = 14 dbx(} syntax error); # dbx: } syntax error = Unmatched right curly bracket ... $SD::Debug::DEBUG = 0; # debugging globally off $DEBUG = 1; # debugging locally on (overrides global) # Set the ENV to enable debugging: $ export SD_DEBUG=1 # Or set the ENV to 0 to enable but start with it off: $ export SD_DEBUG=0 =head1 DESCRIPTION To enable debugging, $ENV{SD_DEBUG} must be defined or LogLevel DEBUG on under mod_perl. If enabled then dbg, dbd and dbx will 'warn' useful information. If not enabled then the macro is removed from the source (actually it's replaced with ' ; '). If debugging is enabled then it can be toggled globally with $SD::Debug::DEBUG or locally with the $DEBUG variable in the scope of the macro. See the t/*debug*.t tests for tips This gives a better idea of how the macro's expand, I'm assuming that '^' isn't used in the code. This could be changed to something trickier (see note at __END__) =over 4 =item dbg dbg warns it's argument: dbg(XXX); ===> { warn 'dbg: ',XXX,"\n" if (...);} =item dbd dbd warns the Data::Dumped value of it's (reference) arguement: dbd(XXX); ===> { warn 'dbx: XXX = ',Data::Dumper::Dumper(XXX)"\n" if (...);} =item dbd dbd warns the evaled value of it's arguement: dbx(XXX); ===> { warn 'dbx: XXX = ', eval q^XXX^,"$@\n" if (...);} =back =head1 CAVEATS Multi-line db[gdx] arguments will mess up the line numbering. These things are macros. Using these "calls" with statement modifiers would be bad. It's best to keep the db[gdx] calls on a line of their own: if($something) { dbg("hi"); } # not: dbg("hi") if $something; =head1 AUTHOR Brad Bowman Ebsb@strategicdata.com.auE Copyright (C) 2003 All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut use strict; use Carp (); use Data::Dumper (); my ($dbg_enable, $dbg_init_on); # init in BEGIN BEGIN { $dbg_enable = defined $ENV{SD_DEBUG}? 1 : 0; # enable? $dbg_init_on = $ENV{SD_DEBUG}; # start globally on? if (exists $ENV{MOD_PERL}) { # mod_perl debugging setup eval "use Apache (); use Apache::Log ()"; die $@ if $@; my $s = Apache->server(); # dbg enabled by server conf no strict 'subs'; # eval'd use is conditional if($s->loglevel == Apache::Log::DEBUG) { $dbg_enable = $dbg_init_on = 1; } } } use constant DEBUG => $dbg_enable; our $DEBUG = $dbg_init_on; # global runtime debugging switch (can be local-ed) our $FILTER_DEBUG ||= 0; # print the filtered code use Filter::Simple sub { # This is the condition for dynamic dbg control # $DEBUG will be in the scope of the db* call my $db_on = '(our $DEBUG, defined $DEBUG ? $DEBUG : $SD::Debug::DEBUG)'; my $dump = 'Terse(1)->Maxdepth(2)->Indent(0)->Dump'; my $sub = q{"\n\t(",((caller(0))[3]||''),')'}; if(DEBUG) { # find dbg dbd dbx macros like: # dbd($some_var[0]); s[ \b dbg \( (.*?) \) ; ] [{ warn 'dbg: ',($1),$sub if $db_on; };]gsx; # multi line args mess the numbering in db[dx] # could fix with #line output after s[ \b dbd \( (.*?) \) ; ] /{ warn q^dbd: $1 = ^,Data::Dumper->new([$1])->$dump,$sub if $db_on; };/gsx; s[ \b dbx \( (.*?) \) ; ] [{ warn q^dbx: $1 = ^, eval q^$1^,"\$@",$sub if $db_on; };]gsx; } else { # Filter away db* code s[ \b db[gdx] \( (.*?) \) ; ] [ ; ]gsx; } print if($FILTER_DEBUG); }; 1; __END__ $possibly_safe = "^!|~???\0"; $mystery_str = '$a !~ qr^some|thing^'; $mystery_str =~ tr!/!!d; eval "(\$safe = \$possibly_safe) =~ tr/$mystery_str//d" print $safe; # "???\0" -------------- next part -------------- A non-text attachment was scrubbed... Name: 01_debug_1.t Type: text/x-perl Size: 625 bytes Desc: not available Url : http://mail.pm.org/archives/melbourne-pm/attachments/20030711/07d1cc7a/01_debug_1.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 01_debug_2.t Type: text/x-perl Size: 2709 bytes Desc: not available Url : http://mail.pm.org/archives/melbourne-pm/attachments/20030711/07d1cc7a/01_debug_2.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 01_debug_3.t Type: text/x-perl Size: 607 bytes Desc: not available Url : http://mail.pm.org/archives/melbourne-pm/attachments/20030711/07d1cc7a/01_debug_3.bin From Nathan.Bailey at its.monash.edu Fri Jul 11 05:11:17 2003 From: Nathan.Bailey at its.monash.edu (Nathan Bailey) Date: Wed Aug 4 00:02:57 2004 Subject: Code metrics? In-Reply-To: "11 Jul 2003 18:07:04 +1000." <"1057910823.813.89.camel"@oxum> Message-ID: <200307111011.h6BABHiA149682@goaway.its.monash.edu.au> In my wanders, I came across: http://starship.python.net/crew/gherman/playground/pycount/ a code-metric measure for Python. Is there a similar beast for perl? It would be nice to have something that counted lines of real code, regardless of how people format their braces, etc... N (just how many lines is the my.m portal... :-) -- Nathan Bailey * Email: Nathan.Bailey@its.monash.edu Manager, Flexible Learning and Teaching Program, Application Services, Information Technology Services * Phone: +61 3 990 54741 Monash University 3800 Australia * Fax: +61 3 990 53024 From stas at stason.org Fri Jul 11 13:47:04 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:57 2004 Subject: Perl implemented in Perl for Perl 6 In-Reply-To: <66DD0451-B34D-11D7-BF41-003065B58CF8@dd.com.au> References: <66DD0451-B34D-11D7-BF41-003065B58CF8@dd.com.au> Message-ID: <3F0F0628.4030603@stason.org> Scott Penrose wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Friday, Jul 11, 2003, at 13:09 Australia/Melbourne, Stas Bekman wrote: > >> Scott Penrose wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>>> I believe that the plan is to make perl5 the second non-trivial >>>> language >>>> ported to parrot, (there is a working BASIC implementation already in >>>> place). >>>> >>>> I'll see what more I can find out about it.... >>> >>> Stas pointed out it is called ponie. >>> http://www.poniecode.org/ >>> What ponie is doing is to take the Perl 5 Core and make it generate >>> Parrot. >>> It also has some extra compatibility layers for shared objects in C >>> to be linked in in the current XS style. >> >> >> AFAIK, it's the other way around. Use parrot to write perl-5.10. > > > OOOOHHHH.... Now that would be way cool - doesn't look like it from the > site notes though. It seems that it is going to use Perl 5 engine > (starting with the current code) and strip out the backend vm and things > that specifically create code for the VM and replace the VM with Parrot > and parrot opcodes rather than the Perl 5 VM opcodes. That's seems to be correct. And as you just said by youself, it's going to run on parrot ;) > But maybe I am reading that wrong. > > Either way - I am excited :-) everybody here at OSCon is excited ;) Too bad you couldn't make it here. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From stas at stason.org Fri Jul 11 13:51:38 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:57 2004 Subject: Code metrics? In-Reply-To: <200307111011.h6BABHiA149682@goaway.its.monash.edu.au> References: <200307111011.h6BABHiA149682@goaway.its.monash.edu.au> Message-ID: <3F0F073A.1080206@stason.org> Nathan Bailey wrote: > In my wanders, I came across: > http://starship.python.net/crew/gherman/playground/pycount/ > a code-metric measure for Python. Is there a similar beast for perl? > It would be nice to have something that counted lines of real code, > regardless of how people format their braces, etc... > > N (just how many lines is the my.m portal... :-) perl -MO=Deparse -le '\ print \ "this is a string" \ # hmm, some comment \ . "another string" \ # bummer, i should end the line now \ ;' \ | wc -l -e syntax OK 2 try without the | wc -l __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From 238098 at bigfoot.com Sun Jul 13 10:33:27 2003 From: 238098 at bigfoot.com (238098@bigfoot.com) Date: Wed Aug 4 00:02:57 2004 Subject: Copy VHS tapes to CD too! 238098 Message-ID: <200307130219.h6D2JPl08851@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030713/8def9a2f/attachment.htm From lovmel at webtv.com Sun Jul 13 21:59:08 2003 From: lovmel at webtv.com (Millie Leblanc) Date: Wed Aug 4 00:02:57 2004 Subject: Lower your company phone bill every month! yjllhpft Message-ID: An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030714/c182680d/attachment.htm From 238136 at mail.com Tue Jul 15 09:11:09 2003 From: 238136 at mail.com (238136@mail.com) Date: Wed Aug 4 00:02:57 2004 Subject: Copy VHS tapes to CD too! 238136 Message-ID: <200307150056.h6F0uZN31842@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030715/76455409/attachment.htm From 238132 at earthlink.net Tue Jul 15 04:42:53 2003 From: 238132 at earthlink.net (238132@earthlink.net) Date: Wed Aug 4 00:02:57 2004 Subject: Web design studio 238132 Message-ID: <200307151346.h6FDkCd05919@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030715/3eb1ec58/attachment.htm From senhordasvendas at ig.com.br Wed Jul 16 21:41:48 2003 From: senhordasvendas at ig.com.br (senhordasvendas) Date: Wed Aug 4 00:02:57 2004 Subject: SUPER PENIS AUMENTE SEU PENIS EM ATE 7cm Message-ID: <20030717030742.6EE0C48741@mail1.panix.com> Com o MANUAL mais cobiçado da internet no momento, você aumenta o tamanho de seu pênis de 2 a 7 cm em 2 meses com exercícios absolutamente naturais. Aumenta também a sua potência, controle e volume da ejaculação, dentre outros benefícios. Programa completo com figuras ilustrativas explicando detalhadamente todos os exercícios. Fotos comparativas no site de pessoas que experimentaram essa técnica. http://www.senhordasvendas.com/superpenis.asp ACESSE JÁ NOSSA COLEÇÃO DE FOTOS DA PLAYBOY,VEJA LINDAS GAGAS TRANSANDO AO VIVO NA NOSSA WEB CÂMERA,FILME DE GATAS TARADAS FAZENDO SEXO ORAL ANAL VAGINAL E TUDO MAIS,FOTOS DAS GATAS DO PAPARAZZO,VEJA NOSSA COLEÇÃO COMPLETA EM http://fotos_das_playboys.tripod.com.br ____________________________________________________________________ OBS: Esta mensagem não é um spam, visto que somente estará sendo enviado uma única vez, e também contém uma forma de ser removida, é um e-mail normal como tantos outros que você recebe, não estamos invadindo sua privacidade e enviar um e-mail não é crime, desde que não contenha mensagens que possam causar danos ao usuário. Caso queria remover seu endereço de nossa lista, basta enviar um e-mail com o titulo (assunto) remover, que seu e-mail será removido de nossa lista definitivamente.Desculpe-nos caso tenhamos lhe importunado com nosso e-mail de divulgação. Obrigado! From scottp at dd.com.au Mon Jul 21 22:47:26 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: New Books and Next Month Message-ID: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey There, Thanks to the banner on our updated web page (still have a few talks to update but it is better than it was and most talks are now there) - we have been given two new free books from O'Reilly. * Practical mod_perl . Now why does that sound familiar? . oh year - written by Stas Bekman . We will have to get him to sign it :-) * Perl Objects References and Modules . Hmmm... forward by Damian Conway. Is this just coincidence on the books we got or are we just a popular place for great Perl mongers :-) Well done guys. OK. Next month. We have a couple of left over short talks that didn't fit into July. Does anyone else have anything they would like to add to next months talks ? Scott - -- Scott Penrose VP in charge of Pancakes http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/HLPRDCFCcmAm26YRAv9wAJ0dIi/tjA7tSOgLRVsBytG/9W6CGgCfaP5K ueInmP9jC56G+3rwnxNu8hc= =/cop -----END PGP SIGNATURE----- From stas at stason.org Tue Jul 22 06:31:42 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:57 2004 Subject: New Books and Next Month In-Reply-To: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> References: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> Message-ID: <3F1D209E.9000700@stason.org> Scott Penrose wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hey There, > > Thanks to the banner on our updated web page (still have a few talks to > update but it is better than it was and most talks are now there) - we > have been given two new free books from O'Reilly. > > * Practical mod_perl Nice ;) > . Now why does that sound familiar? > . oh year - written by Stas Bekman > . We will have to get him to sign it :-) I'd love to do that, but as of now I'm no longer in AU. I'll need help to sponsor my visa for that to happen. If some Melbourne company can help me get a visa I'd love to come back to Melbourne. Meanwhile if any of you are coming to YAPC::Europe please let me know. I've just arrived to Paris. The conference starts tomorrow. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From pjf at perltraining.com.au Tue Jul 22 19:58:14 2003 From: pjf at perltraining.com.au (Paul Fenwick) Date: Wed Aug 4 00:02:57 2004 Subject: New Books and Next Month In-Reply-To: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> References: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> Message-ID: <20030723005814.GC17841@mukc.org.au> G'day Everyone, I'm actually going to be in Melbourne for the next Melb.PM meeting! Hurrah hurrah! I'm very happy to do a talk, either on a module which I maintain (eg, Finance::Quote) or on a module which I expect to write (Finance::PAYG, name to be decided). The talk will probably be short in nature, say 15 minutes or so. At a client, so I've got to run. Cheers, Paul -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 From 238278 at aol.com Tue Jul 22 16:30:44 2003 From: 238278 at aol.com (238278@aol.com) Date: Wed Aug 4 00:02:57 2004 Subject: Is your cock to small?  238278 Message-ID: <200307230134.h6N1YJj06886@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030722/bde3217c/attachment.htm From jarich at perltraining.com.au Tue Jul 22 20:49:32 2003 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed Aug 4 00:02:57 2004 Subject: Bad file number Message-ID: G'day folks, I was hoping I could ask for some advice. I'm using LWP::UserAgent (with Crypt::SSLeay) to connect to a HTTPS service. With one set of certificates it works like a charm and there are no problems at all. With a recently renewed set of certificates I'm having problems. It doesn't even appear that the connection to being attempted, instead my result object is coming out as follows: res: $VAR1 = bless( { '_request' => bless( { '_method' => 'POST', '_headers' => bless( { 'user-agent' => 'libwww-perl/5.65', 'content-type' => 'application/x-www-form-urlencoded' }, 'HTTP::Headers' ), '_uri' => bless( do{\(my $o = 'http://some.site.here')}, 'URI::https' ), '_content' => 'dummy_input=1' }, 'HTTP::Request' ), '_headers' => bless( { 'client-date' => 'Tue, 22 Jul 2003 08:49:30 GMT' }, 'HTTP::Headers' ), '_msg' => 'configure certs failed: failed to load /path/to/devel-client.key: ', '_rc' => 500, '_content' => '' }, 'HTTP::Response' ); from the code: # Create a user agent object my $ua = new LWP::UserAgent; print STDERR "cert: [$cert]\n"; print STDERR "key: [$key]\n"; print STDERR "url: [$url], content: [$input_params]\n"; # Create a request my $req = new HTTP::Request("POST", "$url"); # This is an HTML form $req->content_type('application/x-www-form-urlencoded'); # Give the request object the POSTed input $req->content($input_params); print STDERR "req: " . Dumper( $req ) . "\n"; my $res = $ua->request($req); print STDERR "res: " . Dumper( $res ) . "\n"; print STDERR "call forte response: " .$res->code."\n"; print STDERR "[", $res->content(), "]", "\n"; return $res->content(); I'm sure there must be a problem with my certificate-key pair, as I have another certificate-key pair used by the same code that works perfectly. What is more, if I import this certificate and key into my browser it also works fine when connecting to the site. This has only happened since we've renewed the certificate. $!, $^E are both being set to "Bad file number". $!{EBADF} is set to "9" $@ is not being set, although the _msg above is expecting it to have been. Any theories on where I start to fix this? Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From scottp at dd.com.au Tue Jul 22 21:09:37 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:57 2004 Subject: New Books and Next Month In-Reply-To: <3599EC4E-BBF7-11D7-A2B2-003065B58CF8@dd.com.au> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Had an idea for some additions to next month. * Watch the movies available for download from the O'Reilly OS Conference Scott -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/He5kDCFCcmAm26YRApyaAJ9rRXLm1Gu9IcEnaf7GnqakwnGlVgCfRtr0 4UaZAJKazC80K+Su4e1Zpgs= =0e/Q -----END PGP SIGNATURE----- From piers at ompa.net Wed Jul 23 00:25:59 2003 From: piers at ompa.net (Piers Harding) Date: Wed Aug 4 00:02:57 2004 Subject: Bad file number In-Reply-To: References: Message-ID: <20030723052559.GA4429@badger.local.net> Often when I have seen similar problems, it has been because of file/directory permissions, are the two sets of certs in the same location ? Cheers. On Wed, Jul 23, 2003 at 11:49:32AM +1000, Jacinta Richardson wrote: > > G'day folks, > > I was hoping I could ask for some advice. > > I'm using LWP::UserAgent (with Crypt::SSLeay) to connect to a HTTPS > service. > > With one set of certificates it works like a charm and there are no > problems at all. > > With a recently renewed set of certificates I'm having problems. It > doesn't even appear that the connection to being attempted, instead my > result object is coming out as follows: > > res: $VAR1 = bless( { > '_request' => bless( { > '_method' => 'POST', > '_headers' => bless( { > > 'user-agent' => 'libwww-perl/5.65', > 'content-type' => 'application/x-www-form-urlencoded' > }, > 'HTTP::Headers' ), > > '_uri' => bless( do{\(my $o = > 'http://some.site.here')}, > 'URI::https' ), > '_content' => 'dummy_input=1' > }, 'HTTP::Request' ), > > '_headers' => bless( { > 'client-date' => 'Tue, 22 Jul 2003 > 08:49:30 GMT' > }, 'HTTP::Headers' ), > '_msg' => 'configure certs failed: failed to load > /path/to/devel-client.key: ', > '_rc' => 500, > '_content' => '' > }, 'HTTP::Response' ); > > > from the code: > > > # Create a user agent object > my $ua = new LWP::UserAgent; > > print STDERR "cert: [$cert]\n"; > print STDERR "key: [$key]\n"; > print STDERR "url: [$url], content: [$input_params]\n"; > # Create a request > my $req = new HTTP::Request("POST", "$url"); > > # This is an HTML form > $req->content_type('application/x-www-form-urlencoded'); > > # Give the request object the POSTed input > $req->content($input_params); > > print STDERR "req: " . Dumper( $req ) . "\n"; > my $res = $ua->request($req); > > print STDERR "res: " . Dumper( $res ) . "\n"; > > print STDERR "call forte response: " .$res->code."\n"; > print STDERR "[", $res->content(), "]", "\n"; > return $res->content(); > > > > I'm sure there must be a problem with my certificate-key pair, as I have > another certificate-key pair used by the same code that works perfectly. > What is more, if I import this certificate and key into my browser it > also works fine when connecting to the site. This has only happened > since we've renewed the certificate. > > $!, $^E are both being set to "Bad file number". > $!{EBADF} is set to "9" > $@ is not being set, although the _msg above is expecting it to have > been. > > Any theories on where I start to fix this? > > Jacinta > > > -- > ("`-''-/").___..--''"`-._ | Jacinta Richardson | > `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | > (_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 | > _..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au | > (il),-'' (li),' ((!.-' | www.perltraining.com.au | From BDayton at portphillip.vic.gov.au Wed Jul 23 01:36:42 2003 From: BDayton at portphillip.vic.gov.au (Dayton, Bryan) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question Message-ID: <0F8403D4A7967244A092CBD1884A173F02FE96C2@cpp-stk21.portphillip.vic.gov.au> Hi all, I've just started on Perl - having just done a two day course - and been asked to maintain a heap of perl scripts that are activated via action items on html forms. Is it possible turn on perl debugging in this environment (html) so I can see what the scripts are doing? Bryan Dayton From jarich at perltraining.com.au Wed Jul 23 01:54:21 2003 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <0F8403D4A7967244A092CBD1884A173F02FE96C2@cpp-stk21.portphillip.vic.gov.au> Message-ID: On Wed, 23 Jul 2003, Dayton, Bryan wrote: > Hi all, > > I've just started on Perl - having just done a two day course - and been > asked to maintain a heap of perl scripts that are activated via action > items on html forms. > > Is it possible turn on perl debugging in this environment (html) so I > can see what the scripts are doing? There is a CGI debugger that someone else can probably tell you the name of (Scott?). Alternately, so that you can see what's printed to STDERR and your warnings you might want to use CGI::Carp. This is really easy: !#/usr/bin/perl -w use strict; use CGI::Carp qw/fatalsToBrowser/; use CGI; ..... you can learn more about CGI::Carp by reading: perldoc CGI::Carp I believe it is also well covered in the Camel book but I don't have one here to give you page numbers. All the best and welcome to Perl Mongers Melbourne! Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From jobst at barrett.com.au Wed Jul 23 02:13:36 2003 From: jobst at barrett.com.au (Jobst Schmalenbach) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <0F8403D4A7967244A092CBD1884A173F02FE96C2@cpp-stk21.portphillip.vic.gov.au>; from BDayton@portphillip.vic.gov.au on Wed, Jul 23, 2003 at 04:36:42PM +1000 References: <0F8403D4A7967244A092CBD1884A173F02FE96C2@cpp-stk21.portphillip.vic.gov.au> Message-ID: <20030723171336.A10419@ronnie.barrett.com.au> On Wed, Jul 23, 2003 at 04:36:42PM +1000, Dayton, Bryan (BDayton@portphillip.vic.gov.au) wrote: > Hi all, > > I've just started on Perl - having just done a two day course - and been asked to maintain a heap of perl scripts that are activated via action items on html forms. > > Is it possible turn on perl debugging in this environment (html) so I can see what the scripts are doing? The easiest way (IMHO) is to use print STDERR "some message: $somevar\n"; which will output to the stderr of the webserver, which is (in most cases) a file specified in /etc/httpd/conf/httpd.conf (if you are on a *unix box); ErrorLog /var/log/httpd/error_log You can then simply tail -f /var/log/httpd/error_log and you will see your messages. jobst -- C is a write-only language. __, Jobst Schmalenbach, jobst@barrett.com.au, Technical Director _ _.--'-n_/ Barrett Consulting Group P/L & The Meditation Room P/L -(_)------(_)= +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia From jarich at perltraining.com.au Wed Jul 23 02:31:10 2003 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: Message-ID: On Wed, 23 Jul 2003, Jacinta Richardson wrote: > There is a CGI debugger that someone else can probably tell you the name > of (Scott?). Alternately, so that you can see what's printed to STDERR > and your warnings you might want to use CGI::Carp. This is really easy: Actually this is rather incorrect. CGI::Carp will however give you all the warn(), die(), croak(), confess() and carp() options as regular Carp does, and let you send whichever ones you want of those to the browser. > !#/usr/bin/perl -w > > use strict; > use CGI::Carp qw/fatalsToBrowser/; > use CGI; > > ..... > This in particular will allow you to find out where and why your script is dying from your browser (it'll also go to the log). If you want generated warnings to go to your browser add: use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; > you can learn more about CGI::Carp by reading: > perldoc CGI::Carp including all the stuff I just said. All the best, Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact@perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From melbourne.pm at bowman.bs Wed Jul 23 02:57:07 2003 From: melbourne.pm at bowman.bs (Brad Bowman) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <20030723171336.A10419@ronnie.barrett.com.au> References: <0F8403D4A7967244A092CBD1884A173F02FE96C2@cpp-stk21.portphillip.vic.gov.au> <20030723171336.A10419@ronnie.barrett.com.au> Message-ID: <1058947027.8858.30.camel@oxum> > Is it possible turn on perl debugging in this environment (html) > so I can see what the scripts are doing? You can also often just run them from the command line under the debugger, depends on the particular script. Brad -- In the judgement of the elders, a samurai's obstinacy should be excessive. A thing done with moderation may later be judged insufficient. I have heard that when one thinks he has gone too far, he will not have erred. This sort of rule should not be forgotten. -- Hagakure http://bowman.bs/hagakure/ From scottp at dd.com.au Wed Jul 23 21:33:17 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: Message-ID: <2EBA92A5-BD7F-11D7-884A-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, Jul 23, 2003, at 16:54 Australia/Melbourne, Jacinta Richardson wrote: > On Wed, 23 Jul 2003, Dayton, Bryan wrote: > >> Hi all, >> >> I've just started on Perl - having just done a two day course - and >> been >> asked to maintain a heap of perl scripts that are activated via action >> items on html forms. >> >> Is it possible turn on perl debugging in this environment (html) so I >> can see what the scripts are doing? > > There is a CGI debugger that someone else can probably tell you the > name > of (Scott?). Alternately, so that you can see what's printed to STDERR ptkdb - perl tk debugger is a good tool for doing an interactive debug of a running CGI. In the instructions (see: perldoc Devel::ptkdb after you install it) tells you how to install and run it so that it pops up a graphical debugger when the CGI starts. However it requires an X Server within reach of the CGI - so if you are behind a firewall but your CGI is not then you may have to do tunneling. The other suggestions (print STDERR, Carp etc) are much easier to implement and run on a heavy loaded server. But if you are still stuck and it requires more interactive debugging and you can be the only one on that box then I suggest ptkdb. Scott - -- Scott Penrose Open source developer http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: Open sauce usually ends up never coming out (of the bottle). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/H0VwDCFCcmAm26YRAhj3AJ9eB3eASVQfsXeGsCNC4SpxNUhnsACgtAA3 PSJAo6BFtZZq3z8r5lwr03I= =6xor -----END PGP SIGNATURE----- From stas at stason.org Thu Jul 24 00:55:36 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <2EBA92A5-BD7F-11D7-884A-003065B58CF8@dd.com.au> References: <2EBA92A5-BD7F-11D7-884A-003065B58CF8@dd.com.au> Message-ID: <3F1F74D8.6050303@stason.org> Scott Penrose wrote: [...] >>> Is it possible turn on perl debugging in this environment (html) so I >>> can see what the scripts are doing? >> >> >> There is a CGI debugger that someone else can probably tell you the name >> of (Scott?). Alternately, so that you can see what's printed to STDERR > > > ptkdb - perl tk debugger is a good tool for doing an interactive debug > of a running CGI. You can also use ddd ... [...] __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From jobst at barrett.com.au Thu Jul 24 02:02:29 2003 From: jobst at barrett.com.au (Jobst Schmalenbach) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <3F1F74D8.6050303@stason.org>; from stas@stason.org on Thu, Jul 24, 2003 at 07:55:36AM +0200 References: <2EBA92A5-BD7F-11D7-884A-003065B58CF8@dd.com.au> <3F1F74D8.6050303@stason.org> Message-ID: <20030724170229.C27048@ronnie.barrett.com.au> On Thu, Jul 24, 2003 at 07:55:36AM +0200, Stas Bekman (stas@stason.org) wrote: > Scott Penrose wrote: > [...] > >>> Is it possible turn on perl debugging in this environment (html) so I > >>> can see what the scripts are doing? > >> > >> > >> There is a CGI debugger that someone else can probably tell you the name > >> of (Scott?). Alternately, so that you can see what's printed to STDERR > > > > > > ptkdb - perl tk debugger is a good tool for doing an interactive debug > > of a running CGI. > > You can also use ddd ... ddd? jobst -- My Carpenter has a 1956 VW Beetle. He still can go to any place in Australia, use any Oil, spark plugs, pertol, tires, wiper blades, etc available today with a car that old. If only software would be like that. __, Jobst Schmalenbach, jobst@barrett.com.au, Technical Director _ _.--'-n_/ Barrett Consulting Group P/L & The Meditation Room P/L -(_)------(_)= +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia From mir at pax.apana.org.au Thu Jul 24 02:12:07 2003 From: mir at pax.apana.org.au (Mirko Fluher) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <20030724170229.C27048@ronnie.barrett.com.au> Message-ID: On Thu, 24 Jul 2003, Jobst Schmalenbach wrote: > On Thu, Jul 24, 2003 at 07:55:36AM +0200, Stas Bekman (stas@stason.org) wrote: > > Scott Penrose wrote: > > [...] > > >>> Is it possible turn on perl debugging in this environment (html) so I > > >>> can see what the scripts are doing? > > >> > > >> > > >> There is a CGI debugger that someone else can probably tell you the name > > >> of (Scott?). Alternately, so that you can see what's printed to STDERR > > > > > > > > > ptkdb - perl tk debugger is a good tool for doing an interactive debug > > > of a running CGI. > > > > You can also use ddd ... > > ddd? > from 'man ddd' DESCRIPTION DDD is a graphical front-end for GDB and other command-line debuggers. Using DDD, you can see what is going on "inside" another program while it executes?or what another program was doing at the moment it crashed. uru, -- Mirko Fluher http://pax.apana.org.au From peterm at zeta.org.au Thu Jul 24 02:41:33 2003 From: peterm at zeta.org.au (Peter G. Martin) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <3F1F74D8.6050303@stason.org> Message-ID: <2003724174133.035373@corelli> Stas Bekman: On Thu, 24 Jul 2003 07:55:36 +0200, you are alleged to have written: > >Scott Penrose wrote: >[...] >>>>Is it possible turn on perl debugging in this environment (html) so I >>>>can see what the scripts are doing? >>> >>> >>>There is a CGI debugger that someone else can probably tell you the name >>>of (Scott?). Alternately, so that you can see what's printed to STDERR >> >> >>ptkdb - perl tk debugger is a good tool for doing an interactive debug >>of a running CGI. > >You can also use ddd ... > If and when they get it working in windows, maybe ?? Or is there one now ? That'd be nice... From stas at stason.org Thu Jul 24 04:37:27 2003 From: stas at stason.org (Stas Bekman) Date: Wed Aug 4 00:02:58 2004 Subject: Newbie question In-Reply-To: <20030724170229.C27048@ronnie.barrett.com.au> References: <2EBA92A5-BD7F-11D7-884A-003065B58CF8@dd.com.au> <3F1F74D8.6050303@stason.org> <20030724170229.C27048@ronnie.barrett.com.au> Message-ID: <3F1FA8D7.10508@stason.org> >>You can also use ddd ... > > > ddd? http://www.google.fr/search?q=ddd&ie=UTF-8&oe=UTF-8&hl=fr&btnG=Recherche+Google&meta= __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com From 238358 at email.com Sat Jul 26 19:49:05 2003 From: 238358 at email.com (238358@email.com) Date: Wed Aug 4 00:02:58 2004 Subject: Copy DVD's to a standard CD - without a DVD Burner 238358 Message-ID: <200307270050.h6R0oBY12772@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030726/7ce0cb7c/attachment.htm From 238369 at bigfoot.com Sun Jul 27 08:39:57 2003 From: 238369 at bigfoot.com (238369@bigfoot.com) Date: Wed Aug 4 00:02:58 2004 Subject: Gain upto 3-4 inches!! 238369 Message-ID: <200307271341.h6RDfpR23196@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030727/d7ab7dd1/attachment.htm From rlonstein at pobox.com Sun Jul 27 15:55:30 2003 From: rlonstein at pobox.com (R. Lonstein) Date: Wed Aug 4 00:02:58 2004 Subject: Hello Melbourne PM In-Reply-To: <20030619015425.GC4169@mukc.org.au> References: <20030619013422.GB3211@clio.muses.lonsteins.com> <20030619015425.GC4169@mukc.org.au> Message-ID: <20030727205530.GC2949@clio.muses.lonsteins.com> On Thu, Jun 19, 2003 at 11:54:25AM +1000, Paul Fenwick wrote: [snip] > Welcome to the list! Melbourne is a little bit distant from NSW > (we're in the next state down), but we do have regular meetings the > second Wednesday of each month. (And due to my own travelling [snip] Hi, me again. Well, my wife and I will be driving around NSW and Victoria but we arrive in Melbourne on the afernoon of August 12th. Is there a meeting planned for Wednesday the 13th? If not, how about a beer and/or a meal on occasion of a visiting Perl Monger (that would be me, by the way)? Cheers. - Ross From scottp at dd.com.au Sun Jul 27 17:18:41 2003 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:58 2004 Subject: Hello Melbourne PM In-Reply-To: <20030727205530.GC2949@clio.muses.lonsteins.com> Message-ID: <4785FB7D-C080-11D7-BCC7-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes there is :-) Wednesday 13th of August 6:30 pm myinternet Level 8, 14 Blackwood Street North Melbourne I will make sure I email you when we have the final talks (there will probably be a few small ones and we are planning on showing what videos we can of OSCON). Scott On Monday, Jul 28, 2003, at 06:55 Australia/Melbourne, R. Lonstein wrote: > On Thu, Jun 19, 2003 at 11:54:25AM +1000, Paul Fenwick wrote: > [snip] >> Welcome to the list! Melbourne is a little bit distant from NSW >> (we're in the next state down), but we do have regular meetings the >> second Wednesday of each month. (And due to my own travelling > [snip] > > Hi, me again. Well, my wife and I will be driving around NSW and > Victoria but we arrive in Melbourne on the afernoon of August 12th. Is > there a meeting planned for Wednesday the 13th? If not, how about a > beer and/or a meal on occasion of a visiting Perl Monger (that would > be me, by the way)? > > Cheers. > > - Ross > > > - -- Scott Penrose VP in charge of Pancakes http://linux.dd.com.au/ scottp@dd.com.au Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE/JE/FDCFCcmAm26YRAlSxAJ9npVeADIZN9BGyt2m0bOk9oQGNGgCghjgi N4ry8n6Np/VuNJAdq0gMHBE= =IpsB -----END PGP SIGNATURE----- From 238377 at email.com Sun Jul 27 18:41:56 2003 From: 238377 at email.com (238377@email.com) Date: Wed Aug 4 00:02:58 2004 Subject:  Worried about scratching your favorite movie? 238377 Message-ID: <200307272343.h6RNh4R29327@mail.pm.org> An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030727/452df86c/attachment.htm From ad_hawkinsjcbu at msn.com Mon Jul 28 03:08:03 2003 From: ad_hawkinsjcbu at msn.com (ad_hawkinsjcbu@msn.com) Date: Wed Aug 4 00:02:58 2004 Subject: Laser Toner For Printers, Faxes, and Copiers... Inventory Reduction Message-ID: <3d9d01c354df$5e3e5790$4e4943a2@ad_hawkinsjcbu> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030728/515e9baa/attachment.htm From a457csgqk at bigfoot.com Thu Jul 31 05:09:08 2003 From: a457csgqk at bigfoot.com (Wyatt Hawkins) Date: Wed Aug 4 00:02:58 2004 Subject: Have you found the best Life Insurance Policy? ctaryl Message-ID: An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/melbourne-pm/attachments/20030731/65d30608/attachment.htm