From jarich at perltraining.com.au Fri Sep 1 05:01:20 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Fri, 01 Sep 2006 22:01:20 +1000 Subject: [Melbourne-pm] Software Freedom Day Bazaar Update and Program Message-ID: <44F82110.6040102@perltraining.com.au> G'day everyone, Only 16 days to go! The countdown is on. Melbourne Perl Mongers has been invited to participate in Software Freedom Day at the Melbourne Town Hall. If you'd like to help man the Melbourne Perl Mongers section of the Information Stands set up for the users' groups then please volunteer on this list. It would be great to have the table covered with 1-2 people from 11am - 5pm, so even if you're only available for an hour, please let us know. Having stood at the Melbourne Perl Mongers tables at the old VTR user group open days, I can assure you that this will be quite fun. To show our appreciation to anyone who participates, Perl Training Australia will sponsor soft drinks for those standing behind the table. If you have any Melbourne PM posters you'd like to put up, or Melbourne PM flyers or Perl related business cards to give out, then bring them along to the next meeting (September 13th) and I'll make sure they turn up. It would be great to advertise PerlMeme and similar projects as part of our desk. Kylie and Donna (and the rest of the SFD team) have done a great job of organising this day. If you'd like to be involved in other ways (such as bump in, and bump out) please contact Kylie (CCed on this email) to ask what needs to be done. There's a poster to advertise the event at the bottom of this page: http://vic.computerbank.org.au/Members/kylie/sfdbazaar06 Please print it out and spread the message. A successful event is a great boon to Melbourne Perl Mongers as well! The day's event calendar is below: --------------------------------------------------- Software Freedom Day Bazaar Saturday September 16th 11am - 5pm Town Hall Program 11am to 12.15am: Bazaar Open - Software Demonstrations and Information Stands (all day) 12.15am to12.20pm: Official Opening by MC, Paul Fenwick. 12.20pm to 12.40pm: Software Freedom and Linux Australia (not final). Jon Oxer, Linux Australia 12.40pm to 1.00pm: Web Based Free and Open Source Software for Business. Mark Gray, The WWW Shop 1.00pm to 1.20pm: Liberty not Price. Steve Middleton, Community Media Services 1.20pm to 1.40pm: Bridging the Digital Divide with Free and Open Source Software. Kylie Davies, Computerbank Victoria 1.40pm to 2.00pm: The Open Source Developers Conference 2006. Jacinta Richardson, Open Source Developers Club 2.10pm to 3.00pm: BBC Documentary. The Codebreakers 3.00pm to 4.00pm: Live Linux Laptop World First, Best Dressed Geek Fashion Show, Video link up with other events 4.00pm to 5.00pm: Software Demonstrations. Official Close and Thanks Information stands by Computerbank Victoria, Linux Australia, Linux Users of Victoria, Ballarat Linux Users Group, Melbourne LinuxChix, Melbourne Linux User Group, Melbourne Wireless, Melbourne Perl Mongers, Open Source Developers Club, Open Source Victoria, Open Source Industry in Australia, OzZope Users group, Community Media Services, Indymedia Melbourne, Ubuntu-au, and more. -------------------------------------------------------------------- From alfiejohn at gmail.com Wed Sep 6 18:01:52 2006 From: alfiejohn at gmail.com (Alfie John) Date: Thu, 7 Sep 2006 11:01:52 +1000 Subject: [Melbourne-pm] Weirdness with references Message-ID: Hi (), Could somebody please explain to me why the following die()s my %empty; print %{ $empty{'fake'} } Yet, the following doesn't my %empty; print values %{ $empty{'fake'} } I am thinking that values() flattens the given arguments in an eval? If it does, why? Alfie From simon at unisolve.com.au Wed Sep 6 18:33:16 2006 From: simon at unisolve.com.au (Simon Taylor) Date: Thu, 7 Sep 2006 11:33:16 +1000 Subject: [Melbourne-pm] Weirdness with references In-Reply-To: References: Message-ID: <200609071133.16725.simon@unisolve.com.au> Hello Alfie, > Could somebody please explain to me why the following die()s > > my %empty; > print %{ $empty{'fake'} } > > Yet, the following doesn't > > my %empty; > print values %{ $empty{'fake'} } > > I am thinking that values() flattens the given arguments in an eval? > If it does, why? Actually I think Perl is up to it's old auto-vivification tricks again. If you look at the contents of $empty after your "print values ..." statement you'll see that the hash now has a 'fake' element. (At least it does for me at Perl 5.8.3). Perhaps someone who knows more about Perl internals can offer an opinion? I had thought that this no longer happened. - Simon P.S. If you want weird, try this: my %hash; $hash{print 2.0+3.1} = 'some value'; print $hash{print 2.0+3.1} . "\n"; One of my genetic algorithms bred this monstrosity the other day and I was delighted by the side effect..... ;-) > > Alfie > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm -- Unisolve Pty Ltd - Melbourne, Australia +61 3 9568 2005 From scottp at dd.com.au Wed Sep 6 18:42:20 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 7 Sep 2006 11:42:20 +1000 Subject: [Melbourne-pm] Weirdness with references In-Reply-To: References: Message-ID: <9FFECBE8-D47D-4194-9B08-E6A8D316DB67@dd.com.au> Very odd... A quick note to anyone who tries this - it actually on dies if you "use strict"; > my %empty; > print %{ $empty{'fake'} } Yep - makes sense, you can't use an undef or nothing as a hashref - must be a real hashref. > my %empty; > print values %{ $empty{'fake'} } Nope - makes no sense But here is my fav ! THIS WORKS use warnings; use strict; my %empty; print values %{ $empty{'fake'} }; print %{ $empty{'fake'} }; THIS FAILS use warnings; use strict; my %empty; print %{ $empty{'fake'} }; print values %{ $empty{'fake'} }; so then try this... use warnings; use strict; use Data::Dumper; my %empty; print Dumper(\%empty); print values %{ $empty{'fake'} }; print Dumper(\%empty); print %{ $empty{'fake'} }; And you see what is happening ! $VAR1 = {}; $VAR1 = { 'fake' => {} }; So the "values" sort of "forces" it to be a hashref - I guess that in that case it returns an lvalue or similar and as values must be on a hash it makes it so... maybe? Scott -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Anthropomorphic Personification Expert http://search.cpan.org/search?author=SCOTT scott at 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. Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. From alfiejohn at gmail.com Wed Sep 6 19:02:09 2006 From: alfiejohn at gmail.com (Alfie John) Date: Thu, 7 Sep 2006 12:02:09 +1000 Subject: [Melbourne-pm] Weirdness with references In-Reply-To: <9FFECBE8-D47D-4194-9B08-E6A8D316DB67@dd.com.au> References: <9FFECBE8-D47D-4194-9B08-E6A8D316DB67@dd.com.au> Message-ID: Thanks guys! I should have Dumper()'d it before hand. Now another wierd thing I just found: FAILS print %{ {} } WORKS print %{ undef || {} } Looks like Perl doesn't like balanced curlies without any surrounding fluff :) Alfie On 9/7/06, Scott Penrose wrote: > Very odd... > > A quick note to anyone who tries this - it actually on dies if you > "use strict"; > > > my %empty; > > print %{ $empty{'fake'} } > > Yep - makes sense, you can't use an undef or nothing as a hashref - > must be a real hashref. > > > my %empty; > > print values %{ $empty{'fake'} } > > Nope - makes no sense > > But here is my fav ! > > THIS WORKS > > use warnings; > use strict; > my %empty; > print values %{ $empty{'fake'} }; > print %{ $empty{'fake'} }; > > THIS FAILS > > use warnings; > use strict; > my %empty; > print %{ $empty{'fake'} }; > print values %{ $empty{'fake'} }; > > so then try this... > > use warnings; > use strict; > use Data::Dumper; > my %empty; > print Dumper(\%empty); > print values %{ $empty{'fake'} }; > print Dumper(\%empty); > print %{ $empty{'fake'} }; > > And you see what is happening ! > > $VAR1 = {}; > $VAR1 = { > 'fake' => {} > }; > > So the "values" sort of "forces" it to be a hashref - I guess that in > that case it returns an lvalue or similar and as values must be on a > hash it makes it so... maybe? > > Scott > -- > * - * http://www.osdc.com.au - Open Source Developers Conference * - * > Scott Penrose > Anthropomorphic Personification Expert > http://search.cpan.org/search?author=SCOTT > scott at 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. > > Please do not send me Word or PowerPoint attachments. > See http://www.gnu.org/philosophy/no-word-attachments.html > > Microsoft is not the answer. It's the question. And the answer is no. > > > From leif.eriksen at hpa.com.au Wed Sep 6 19:29:21 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Thu, 7 Sep 2006 12:29:21 +1000 Subject: [Melbourne-pm] Weirdness with references Message-ID: Another valuable debugging tool is the B::Deparse module - to see what Perl internally parsed your code to be. In this case however, all it gives is a bigger headache. le6303 at hpa-3a0cc069587 ~ $ perl -MO=Deparse -e 'print %{ { } }' print %{{};}; -e syntax OK le6303 at hpa-3a0cc069587 ~ $ Note I had to add a space between the inner hash ref - else it?s a compile error !? But if you type in what Deparse returns, it still a syntax error ! le6303 at hpa-3a0cc069587 ~ $ perl -MO=Deparse -e 'print %{{ }}' print %{{};}; -e syntax OK le6303 at hpa-3a0cc069587 ~ $ perl -MO=Deparse -e 'print %{{};};' Unmatched right curly bracket at -e line 1, at end of line syntax error at -e line 1, near ";}" -e had compilation errors. Weird. L -----Original Message----- From: alfiejohn at gmail.com [mailto:alfiejohn at gmail.com] Sent: Thursday, 7 September 2006 12:02 PM To: scottp at dd.com.au Cc: melbourne-pm at pm.org Subject: Re: [Melbourne-pm] Weirdness with references Thanks guys! I should have Dumper()'d it before hand. Now another wierd thing I just found: FAILS print %{ {} } WORKS print %{ undef || {} } Looks like Perl doesn't like balanced curlies without any surrounding fluff :) Alfie On 9/7/06, Scott Penrose wrote: > Very odd... > > A quick note to anyone who tries this - it actually on dies if you > "use strict"; > > > my %empty; > > print %{ $empty{'fake'} } > > Yep - makes sense, you can't use an undef or nothing as a hashref - > must be a real hashref. > > > my %empty; > > print values %{ $empty{'fake'} } > > Nope - makes no sense > > But here is my fav ! > > THIS WORKS > > use warnings; > use strict; > my %empty; > print values %{ $empty{'fake'} }; > print %{ $empty{'fake'} }; > > THIS FAILS > > use warnings; > use strict; > my %empty; > print %{ $empty{'fake'} }; > print values %{ $empty{'fake'} }; > > so then try this... > > use warnings; > use strict; > use Data::Dumper; > my %empty; > print Dumper(\%empty); > print values %{ $empty{'fake'} }; > print Dumper(\%empty); > print %{ $empty{'fake'} }; > > And you see what is happening ! > > $VAR1 = {}; > $VAR1 = { > 'fake' => {} > }; > > So the "values" sort of "forces" it to be a hashref - I guess that in > that case it returns an lvalue or similar and as values must be on a > hash it makes it so... maybe? > > Scott > -- > * - * http://www.osdc.com.au - Open Source Developers Conference * - > * Scott Penrose Anthropomorphic Personification Expert > http://search.cpan.org/search?author=SCOTT > scott at 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. > > Please do not send me Word or PowerPoint attachments. > See http://www.gnu.org/philosophy/no-word-attachments.html > > Microsoft is not the answer. It's the question. And the answer is no. > > > _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 6/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 6/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** From melbourne-pm at mjch.net Thu Sep 7 18:54:08 2006 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Fri, 8 Sep 2006 11:54:08 +1000 Subject: [Melbourne-pm] SWIG compile errors? Message-ID: <20060908015408.GT27237@mjch.net> I'm trying to build XML::Xerces for Solaris 10 using the Sun Studio 11 compiler and I'm running into compiler errors when compiling Xerces.cpp: |CC -c -I. -IHandler -I/store/mjch/build/xerces-c-src_2_7_0/include -w -DNDEBUG -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -D_REENTRANT -O -DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -KPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris-thread-multi/CORE" Xerces.cpp |"Xerces.cpp", line 1901: Error: Formal argument maybe_tainted of type char* in call to Perl_sv_vsetpvfn(interpreter*, sv*, const char*, unsigned, void**, sv**, long, char*) is being passed bool*. |"Xerces.cpp", line 67917: Warning (Anachronism): Using int(*)(interpreter*,sv*,magic*) to initialize extern "C" int(*)(interpreter*,sv*,magic*). |"Xerces.cpp", line 67917: Warning (Anachronism): Using int(*)(interpreter*,sv*,magic*) to initialize extern "C" int(*)(interpreter*,sv*,magic*). : : [ followed by ~480 similar warnings before exiting ] : xerces-c itself seems to compile and install OK, but this error is a show-stopper, unfortunately ... I've tried building the same package but using the Sun Freeware-packaged gcc compiler (version 3.4.3) but that bails at the linking stage complaining that it can't find libCrun, even when the paths that contain it (/usr/lib and /usr/sparcv9) are explicitly added to LDFLAGS ... ... has anyone built this package under Solaris 10 who would be able to give me a hand? I'm hoping I don't need to attempt to install SWIG and recreate Xerces.cpp somehow but it looks like it may be necessary, worse luck ... thanks, Malcolm -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From leif.eriksen at hpa.com.au Thu Sep 7 19:34:39 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Fri, 8 Sep 2006 12:34:39 +1000 Subject: [Melbourne-pm] SWIG compile errors? Message-ID: Well I have built it on Solaris, but a long time ago. And I used gcc rather than Workshop (as it was then, now its called Studio as you mentioned). But looking at the error, the parameter maybe_tainted sounds like it should be bool (or bool *) - so perhaps a cast to char * at the appropriate point will be enough - if maybe_tainted is indeed being used in a boolean way (e.g. just being used to check it is or isnt zero), the cast will be innocuous. Do you have a non-Sun platform you can compile this on ? Perhaps you can compare the generated code. L -----Original Message----- From: melbourne-pm at mjch.net [mailto:melbourne-pm at mjch.net] Sent: Friday, 8 September 2006 11:54 AM To: melbourne-pm at pm.org Subject: [Melbourne-pm] SWIG compile errors? I'm trying to build XML::Xerces for Solaris 10 using the Sun Studio 11 compiler and I'm running into compiler errors when compiling Xerces.cpp: |CC -c -I. -IHandler -I/store/mjch/build/xerces-c-src_2_7_0/include -w -DNDEBUG -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -D_REENTRANT -O -DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -KPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris-thread-multi/CORE" Xerces.cpp |"Xerces.cpp", line 1901: Error: Formal argument maybe_tainted of type char* in call to Perl_sv_vsetpvfn(interpreter*, sv*, const char*, unsigned, void**, sv**, long, char*) is being passed bool*. |"Xerces.cpp", line 67917: Warning (Anachronism): Using int(*)(interpreter*,sv*,magic*) to initialize extern "C" int(*)(interpreter*,sv*,magic*). |"Xerces.cpp", line 67917: Warning (Anachronism): Using int(*)(interpreter*,sv*,magic*) to initialize extern "C" int(*)(interpreter*,sv*,magic*). : : [ followed by ~480 similar warnings before exiting ] : xerces-c itself seems to compile and install OK, but this error is a show-stopper, unfortunately ... I've tried building the same package but using the Sun Freeware-packaged gcc compiler (version 3.4.3) but that bails at the linking stage complaining that it can't find libCrun, even when the paths that contain it (/usr/lib and /usr/sparcv9) are explicitly added to LDFLAGS ... ... has anyone built this package under Solaris 10 who would be able to give me a hand? I'm hoping I don't need to attempt to install SWIG and recreate Xerces.cpp somehow but it looks like it may be necessary, worse luck ... thanks, Malcolm -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 6/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 6/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** From pgiorgil at ford.com Thu Sep 7 21:40:39 2006 From: pgiorgil at ford.com (Giorgilli, Peter (P.)) Date: Fri, 8 Sep 2006 12:40:39 +0800 Subject: [Melbourne-pm] Seeking contract Perl programmer Message-ID: Dear Melbourne Perl Mongers, I'm currently working under contract to Ford Credit Australia Ltd as Perl programmer/UNIX sysadmin on whose behalf I'm now posting to the list. As a preface to what follows: they have been underwhelmed by the response to their job ("seek.com.au") ad seeking the services of a contract Perl programmer, which is why I suggested posting here. Without further ado... Ford Credit Australia Ltd is seeking the services of a contract Perl programmer. This position is now being advertised on "seek.com.au". Search for "Ford Perl Linux SLES" and you should find the online job ad, the text of which is also included below. Note, please direct job applications via "seek.com.au" or simply reply to this email and attach your resume in PDF-format, or MS Word if you must. Regards Peter ---BEGIN JOB AD--- St Kilda Road Location Finance Industry 12 month contract Ford Credit is an indirect, wholly owned subsidiary of the Ford Motor Company dedicated to providing automotive finance to more than 11 million customers in 36 countries. Our business is fast paced, consumer oriented and requires people with who can be effective in dealing with a variety of cultures. Our Melbourne based office is responsible for the delivery and support of applications operating throughout Asia Pacific and Latin America. We are seeking a PERL Programmer with strong knowledge of Linux/Unix to play an important role in a major project migrating a regional application to a new Linux/Oracle platform. You will assess client requirements, design, implement and maintain programming solutions, provide recommendations for process and programming improvements and develop reporting and monitoring systems. To be considered for this position you must possess the following skills and personal characteristics: * Professional qualifications in a IT or related discipline * Minimum 3 years commercial experience within a similar role * Extensive knowledge of PERL scripting (highly competent) * Strong SQL scripting skills (PERL DBI preferred) * In depth working knowledge of Linux SLES 9 * Ability to resolve issues/problems independently * Excellent verbal and written communication skills From melbourne-pm at mjch.net Sun Sep 10 17:18:34 2006 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Mon, 11 Sep 2006 10:18:34 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: <20060911001834.GW27237@mjch.net> Over the weekend I had another look at getting XML::Xerces running on this Solaris machine. I went back to using gcc to compile both the xerces-c library and the SWIG wrapper for it and again came across the missing requirement for -lCrun at link time. After poking around a bit I discovered that libCrun is only used by the Sun compiler and was not used by gcc at all ... so, after a small Makefile edit I was able to cleanly compile the C++ portion of XML::Xerces and begin testing ... Unfortunately I haven't managed to get it to pass the bundled tests yet. It seems that any time the xerces-c library needs to raise an exception triggered by bad input (as tested for in the test suite) it will throw an exception that the Perl portion of the code doesn't catch properly and dies with a fatal error. For example: |t/DOMDocument.............1..11 |ok 1 - module loaded |ok 2 - importing a child from a different document |terminate called after throwing an instance of 'xercesc_2_7::DOMException' |dubious | Test returned status 0 (wstat 134, 0x86) |DIED. FAILED tests 3-11 | Failed 9/11 tests, 18.18% okay The code which produces the above fatal error looks like: |# check that creating an element with an illegal charater |eval { | my $el = $doc1->createElement('?'); |}; |my $error = $@; |ok($error,'creating document with illegal raises exception'); I went through the test suite and commented out instances of these errors to make sure that any following tests which might still pass were run, however there weren't many ... -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From leif.eriksen at hpa.com.au Sun Sep 10 17:31:52 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Mon, 11 Sep 2006 10:31:52 +1000 Subject: [Melbourne-pm] XML::Xerces Message-ID: Well done - so it works but code and tests are out of sync ? Taking the tests to be the 'spec', the code needs to be patched. Until then, just make sure you wrap the code that dies in evals. Given that your working with X::X 2.7.0 and that came out in March, you may have a hope of getting this looked at by the developers (then again that?s the first new code for 2 years) - especially if you can come up with a patch to the perl (XS code I guess) to handle the exception. Leif -----Original Message----- From: melbourne-pm at mjch.net [mailto:melbourne-pm at mjch.net] Sent: Monday, 11 September 2006 10:19 AM To: melbourne-pm at pm.org Subject: [Melbourne-pm] XML::Xerces Over the weekend I had another look at getting XML::Xerces running on this Solaris machine. I went back to using gcc to compile both the xerces-c library and the SWIG wrapper for it and again came across the missing requirement for -lCrun at link time. After poking around a bit I discovered that libCrun is only used by the Sun compiler and was not used by gcc at all ... so, after a small Makefile edit I was able to cleanly compile the C++ portion of XML::Xerces and begin testing ... Unfortunately I haven't managed to get it to pass the bundled tests yet. It seems that any time the xerces-c library needs to raise an exception triggered by bad input (as tested for in the test suite) it will throw an exception that the Perl portion of the code doesn't catch properly and dies with a fatal error. For example: |t/DOMDocument.............1..11 |ok 1 - module loaded |ok 2 - importing a child from a different document terminate called |after throwing an instance of 'xercesc_2_7::DOMException' |dubious | Test returned status 0 (wstat 134, 0x86) DIED. FAILED tests |3-11 | Failed 9/11 tests, 18.18% okay The code which produces the above fatal error looks like: |# check that creating an element with an illegal charater eval { | my $el = $doc1->createElement('?'); |}; |my $error = $@; |ok($error,'creating document with illegal raises exception'); I went through the test suite and commented out instances of these errors to make sure that any following tests which might still pass were run, however there weren't many ... -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.2/442 - Release Date: 8/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.2/442 - Release Date: 8/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** From melbourne-pm at mjch.net Sun Sep 10 17:42:25 2006 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Mon, 11 Sep 2006 10:42:25 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: <20060911004225.GX27237@mjch.net> On Mon, Sep 11, 2006 at 10:31:52AM +1000, leif.eriksen at hpa.com.au wrote: |Well done - so it works but code and tests are out of sync ? Taking the |tests to be the 'spec', the code needs to be patched. | |Until then, just make sure you wrap the code that dies in evals. ... from my understanding of the code, it already was ... |Given that your working with X::X 2.7.0 and that came out in March, you |may have a hope of getting this looked at by the developers (then again |that?s the first new code for 2 years) - especially if you can come up |with a patch to the perl (XS code I guess) to handle the exception. hmmm ... we have an already-compiled and working version of the module running on Solaris 8, compiled against Perl 5.8.4 with the 64-bit integer options ... we're wanting to get it running on Perl 5.8.7 and Solaris 10, but I don't know enough about the differences between these two to make a guess as to why this would fail to utterly ... -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From blm at woodheap.org Mon Sep 11 02:29:41 2006 From: blm at woodheap.org (blm at woodheap.org) Date: Mon, 11 Sep 2006 19:29:41 +1000 Subject: [Melbourne-pm] Meeting this week Wed 13th 6:30pm Message-ID: <20060911092941.GA17724@woodheap.org> G'day everyone, You and all of your friends, family and other interested people are invited to our meeting next week. Date: Wednesday 13th August Time: 6:30pm Location: (Usual place) Level 8, 14 Blackwood Street, North Melbourne A description of the talks follows. If you have a talk that you would like to give please do not hesitate to email me. Scott Penrose - Benefits of using mod_perl 2 Scott will be demonstrating the huge benefits of working with Mod Perl 2 in Apache2 and Perl. Apache 2 development is fun easy and very rewarding. mod_perl 2 was released in December 2004 as stable into Apache 2 space, and is an official part of the Apache project. Scott will be demonstrating the use of Authentication Modules, Standard Handlers (the things that create content like CGI and PHP) and of course the incoming and outgoing filters (fun with changing stuff on the fly) - but also some other handlers - one which creates new environment variables on the fly to existing code (useful for SSI, CGI, PHP etc). The benefits of filters and handlers that can do a sub- request are shown with his new module Apache::Thumbnail. Most of all Scott will be demonstrating Apache 2 mod_perl modules working in and together with other languages - filtering Java, Authentication PHP and more. In a grand finale a short demonstration of the Editure myinternet Suite ported to using the Zaltana framework will show the steps and how easy it was. Simon Taylor - 'Interesting new things in the Perl DBI module' Simon will be giving a talk about new things in the DBI module. He will be covering: Profiling Unicode convenience functions New and enhanced methods Enhance error handling From leif.eriksen at hpa.com.au Mon Sep 11 18:00:53 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Tue, 12 Sep 2006 11:00:53 +1000 Subject: [Melbourne-pm] Tidyview 1.04 released !! Message-ID: Hi All, Another iteration in the fast paced world of code indentation and formatting has come to pass - Tidyview 1.04 is available from sourceforge. http://sourceforge.net/projects/tidyview Some recent celebrity comments :- Scarlett Johansson - "I was so excited by this project, I just begged Leif to let me setup the config files!" Al Pacino - "At first I though he was just some wise-ass punk, but after I saw what it could do, I said to myself 'he's still a punk, but he's got some cajones on him.' " Patrick Stewart - "I've had TidyView installed in my captains chair, so now I can picture how I want my source code, and, at the press of a button, I can 'make it so' . Ha! Get it ? Make it so ? Ha!" Fixes include suuport for --no_XXX style options and a fix to the locked scrollbar - there is still an issue with mouse wheel events (button-4 and button-5 generally) but the scrollbar itself is stable. Enjoy, and TidyView your automated reformatting problems away !!!!! Leif Eriksen Research and Development Engineer HPA Direct: +61 3 9217 5545 www.hpa.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.2/442 - Release Date: 8/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/melbourne-pm/attachments/20060912/c0cb4eb1/attachment.html From blm at woodheap.org Tue Sep 12 17:42:38 2006 From: blm at woodheap.org (blm at woodheap.org) Date: Wed, 13 Sep 2006 10:42:38 +1000 Subject: [Melbourne-pm] There is a job available at Editure. Message-ID: <20060913004238.GA24824@woodheap.org> Hello everyone, This is just a heads up. There is a position available at Editure. It is for a Senior Developer at our North Melbourne office. Basically, the job involves developing and maintaining our web-based application suite written mostly in Perl and providing technical leadership and mentorship. All the details are in the job ad placed with www.seek.com.au You can send applications in via seek. http://www.seek.com.au/showjob.asp?jobid=7686091 I personally think that it is a great place to work. Regards, Ben Marsh From leif.eriksen at hpa.com.au Tue Sep 12 18:21:27 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Wed, 13 Sep 2006 11:21:27 +1000 Subject: [Melbourne-pm] There is a job available at Editure. Message-ID: They could do interviews tonight - everyone, bring your resumes !!!! L -----Original Message----- From: blm at woodheap.org [mailto:blm at woodheap.org] Sent: Wednesday, 13 September 2006 10:43 AM To: melbourne-pm at pm.org Subject: [Melbourne-pm] There is a job available at Editure. Hello everyone, This is just a heads up. There is a position available at Editure. It is for a Senior Developer at our North Melbourne office. Basically, the job involves developing and maintaining our web-based application suite written mostly in Perl and providing technical leadership and mentorship. All the details are in the job ad placed with www.seek.com.au You can send applications in via seek. http://www.seek.com.au/showjob.asp?jobid=7686091 I personally think that it is a great place to work. Regards, Ben Marsh _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/446 - Release Date: 12/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/446 - Release Date: 12/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** From scottp at dd.com.au Wed Sep 13 19:05:32 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 12:05:32 +1000 Subject: [Melbourne-pm] Mod_perl2 Message-ID: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> Hey Guys Firstly - sorry about my unprepaired talk last night. Work has been a bit crazy, and I should have remember my rule about doing unprepared talks :-) Anyway, some questions got me thinking, in particular the appropriate use of mod_perl vs other methods of writing applications. And that got me thinking - where do I write such stuff? What is needed, like with most OS projects, is a good WIKI to collaboratively update the mod_perl content. Although a mod_perl wiki should really be part of the mod_perl project, rather than going down that track, until it is required/popular, I suggest we create some pages on perl.net.au. The sort of topics I would like to cover are: * Why should you use mod_perl * Why should you use mod_perl2 * Why should you not use mod_perl * Processing Parameters, Environment Variables and Headers - in Content and Filter handlers (and other stages) That sort of thing. Scooter -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Anthropomorphic Personification Expert http://search.cpan.org/search?author=SCOTT scott at 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. Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. From leif.eriksen at hpa.com.au Wed Sep 13 20:02:38 2006 From: leif.eriksen at hpa.com.au (leif.eriksen at hpa.com.au) Date: Thu, 14 Sep 2006 13:02:38 +1000 Subject: [Melbourne-pm] Mod_perl2 Message-ID: +1 I would love to see something like this, and I agree that for now, p.n.a is the right spot for it. Sadly I have nothing to contribute, but I will be an eager consumer of this content. L -----Original Message----- From: scottp at dd.com.au [mailto:scottp at dd.com.au] Sent: Thursday, 14 September 2006 12:06 PM To: melbourne-pm at pm.org Subject: [Melbourne-pm] Mod_perl2 Hey Guys Firstly - sorry about my unprepaired talk last night. Work has been a bit crazy, and I should have remember my rule about doing unprepared talks :-) Anyway, some questions got me thinking, in particular the appropriate use of mod_perl vs other methods of writing applications. And that got me thinking - where do I write such stuff? What is needed, like with most OS projects, is a good WIKI to collaboratively update the mod_perl content. Although a mod_perl wiki should really be part of the mod_perl project, rather than going down that track, until it is required/popular, I suggest we create some pages on perl.net.au. The sort of topics I would like to cover are: * Why should you use mod_perl * Why should you use mod_perl2 * Why should you not use mod_perl * Processing Parameters, Environment Variables and Headers - in Content and Filter handlers (and other stages) That sort of thing. Scooter -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Anthropomorphic Personification Expert http://search.cpan.org/search?author=SCOTT scott at 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. Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/447 - Release Date: 13/09/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.3/447 - Release Date: 13/09/2006 ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, postmaster at hpa.com.au, then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by Ironport. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** From andrew.speer at isolutions.com.au Wed Sep 13 20:12:59 2006 From: andrew.speer at isolutions.com.au (Andrew Speer) Date: Thu, 14 Sep 2006 12:42:59 +0930 (CST) Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> Message-ID: <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> On Thu, September 14, 2006 11:35 am, Scott Penrose wrote: > Hey Guys > > .. snip .. > > The sort of topics I would like to cover are: > > * Why should you use mod_perl > * Why should you use mod_perl2 > * Why should you not use mod_perl > * Processing Parameters, Environment Variables and Headers - in > Content and Filter handlers (and other stages) > Hi, I am from Adelaide, so was not able to make the meeting. It may have been covered, but one of the issues I seen when using mod_perl(2) is memory usage per connection. When using Apache with mod_perl processes can easily grow to 10M+ (or more, depending on the app). If the site/app suddenly becomes subject to a high load Apache will spawn more processes to service the load. Unless you have given very careful consideration to memory utilisation the server can easily be swamped by Apache processes needing more memory than is physically available. The server starts swapping and performance suffers badly. There are ways and means around this problem, but they all seem a bit kludgy - front-end proxy servers, multiple Apache servers (Apache with mod_perl for dynamic content, straight Apache for static content). If your main need is content-phase dynamic content (a big part of most mod_perl apps) you may want to have a look at lighttpd + fastCGI and the CPAN FastCGI module. lighttpd spawns as many Perl FastCGI processes and you want, and only sends requests to them if dynamic content generations is required - as opposed to Apache, which in the "default" mod_perl config will handle both static and dynamic content - ie you may have a 10M+ process tied up sending down a JPEG or CSS file. If you want to do tricky stuff outside the content generation phase then mod_perl is still one of the best/easiest ways to extend Apache with Perl. Anyway, there are heaps of resources on the Internet discussing these sort of issues, but a dedicated mod_perl wiki does sound like a good idea. Now for a shameless plug of my mod_perl framework. Have a look at http://webdyne.org/ for my implementation of YAPWF (Yet Another Perl Web Framework). It started off as a mod_perl implementation, but now runs under IIS/lighttpd and FastCGI also. Regards, Andrew Speer From scottp at dd.com.au Wed Sep 13 20:40:13 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 13:40:13 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> Message-ID: <83F1E4E3-468A-416E-96DA-3D9E82FFAE9D@dd.com.au> On 14/09/2006, at 13:12, Andrew Speer wrote: > On Thu, September 14, 2006 11:35 am, Scott Penrose wrote: >> Hey Guys >> >> .. snip .. >> >> The sort of topics I would like to cover are: >> >> * Why should you use mod_perl >> * Why should you use mod_perl2 >> * Why should you not use mod_perl >> * Processing Parameters, Environment Variables and Headers - in >> Content and Filter handlers (and other stages) >> > > Hi, > > I am from Adelaide, so was not able to make the meeting. It may > have been > covered, but one of the issues I seen when using mod_perl(2) is memory > usage per connection. > > When using Apache with mod_perl processes can easily grow to 10M+ (or > more, depending on the app). If the site/app suddenly becomes > subject to a > high load Apache will spawn more processes to service the load. > Unless you > have given very careful consideration to memory utilisation the > server can > easily be swamped by Apache processes needing more memory than is > physically available. The server starts swapping and performance > suffers > badly. I think this is to do with Perl, not mod_perl. Our stand alone perl daemons for web applications, once loaded all the necessary modules often start at around 80MB. However, each fork or thread consumes virtually no more memory - unless you are using an older Digital Unix, or Solaris - as they are always spawned copy on write - which means most content does not get effected. I have found a 512MB machine with a 100MB Apache process can easily be forked 50+ times without hitting swap. However, what you are talking about is correct - memory is an issue, but my thought on the space is that a stand alone application causes the same memory consumption. > There are ways and means around this problem, but they all seem a bit > kludgy - front-end proxy servers, multiple Apache servers (Apache with > mod_perl for dynamic content, straight Apache for static content). I have seen this often, especially using two apache servers, one for static content the other for dynamic. I have never needed to do this, and question some of the assumptions - e.g. the time to fork an apache daemon is fairly constant, and not usually affected by process size, and if you hit only the internal C default handler for static content, should be about as fast. I suspect that if you add in a bad handler or config handler, or other startup type modules, then you are running perl code on fork that may not be required and that people do this way for convenience. What we need is some work proving one way or another what is happening - not too hard to do, just requires a good day from people. > If your main need is content-phase dynamic content (a big part of most > mod_perl apps) you may want to have a look at lighttpd + fastCGI > and the > CPAN FastCGI module. lighttpd spawns as many Perl FastCGI processes > and > you want, and only sends requests to them if dynamic content > generations > is required - as opposed to Apache, which in the "default" mod_perl > config > will handle both static and dynamic content - ie you may have a 10M+ > process tied up sending down a JPEG or CSS file. My experience with the above is you get the same memory footprint. As I said, it is not mod_perl, it is Perl that is large. I am amused by the 10M process too because our process are normally about 300MB using perl, and Java Tomcat starts at about 800MB+ - we have servers that one process is GB for TomCat - but it still runs at a few hundred hits a second. Although it is slow not because of the process size but because of what it is doing. > If you want to do tricky stuff outside the content generation phase > then > mod_perl is still one of the best/easiest ways to extend Apache > with Perl. > > Anyway, there are heaps of resources on the Internet discussing > these sort > of issues, but a dedicated mod_perl wiki does sound like a good idea. Agreed. It would be nice to have these sort of questions, maybe some anecdotes (like we have both written here) and then some tests to prove the items. All easy if we had a place to document. > Now for a shameless plug of my mod_perl framework. Have a look at > http://webdyne.org/ for my implementation of YAPWF (Yet Another > Perl Web > Framework). It started off as a mod_perl implementation, but now runs > under IIS/lighttpd and FastCGI also. Scott From daniel at rimspace.net Wed Sep 13 20:43:49 2006 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 14 Sep 2006 13:43:49 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> (Andrew Speer's message of "Thu, 14 Sep 2006 12:42:59 +0930 (CST)") References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> Message-ID: <871wqfcdu2.fsf@rimspace.net> "Andrew Speer" writes: > On Thu, September 14, 2006 11:35 am, Scott Penrose wrote: >> Hey Guys >> >> .. snip .. >> >> The sort of topics I would like to cover are: >> >> * Why should you use mod_perl >> * Why should you use mod_perl2 >> * Why should you not use mod_perl >> * Processing Parameters, Environment Variables and Headers - in >> Content and Filter handlers (and other stages) > > I am from Adelaide, so was not able to make the meeting. It may have > been covered, but one of the issues I seen when using mod_perl(2) is > memory usage per connection. > > When using Apache with mod_perl processes can easily grow to 10M+ (or > more, depending on the app). Only 10MB? Lucky you. One of my clients has around 70MB of footprint from their mod_perl related code.[1] Also, remember that most of that memory is shared between Apache instances in a copy-on-write fashion. So, for all that you have the same 70MB each fork you end up with 2MB of extra memory used each time. The overall memory figure can be *very* misleading, and it is very hard to get an impression of the level of private memory a Linux binary uses, because of the way copy-on-write data is accounted. > If the site/app suddenly becomes subject to a high load Apache will > spawn more processes to service the load. Unless you have given very > careful consideration to memory utilisation the server can easily be > swamped by Apache processes needing more memory than is physically > available. The server starts swapping and performance suffers badly. This is true regardless of the code you use on the server, though. Getting it wrong is more visible if you get the memory use analysis wrong, but a PHP script that works over 64MB of dynamic data is just at deadly as a static 10MB from Perl. > There are ways and means around this problem, but they all seem a bit > kludgy - front-end proxy servers, multiple Apache servers (Apache with > mod_perl for dynamic content, straight Apache for static content). ...er, or you could tune your Apache process correctly. That way you fixed the problem rather than trying to work around it. > If your main need is content-phase dynamic content (a big part of most > mod_perl apps) you may want to have a look at lighttpd + fastCGI and > the CPAN FastCGI module. lighttpd spawns as many Perl FastCGI > processes and you want, and only sends requests to them if dynamic > content generations is required - as opposed to Apache, which in the > "default" mod_perl config will handle both static and dynamic content > - ie you may have a 10M+ process tied up sending down a JPEG or CSS > file. Apache also supports FastCGI -- with the original FastCGI module and the newer (and more free) FCGI module. Both of these give the same benefits as lighttpd and FastCGI, plus the advantages that mod_perl and other Apache modules provide. > If you want to do tricky stuff outside the content generation phase > then mod_perl is still one of the best/easiest ways to extend Apache > with Perl. Yes. I strongly encourage people to use FastCGI for the main content generation phase -- for both PHP and Perl. It provides the same advantages as mod_perl in terms of static initialization and shared memory, gives you (potentially) better control over the load from the application, and decouples the life cycle of the dynamic application and the Apache instance. Regards, Daniel Footnotes: [1] The application has other issues, so this isn't entirely the fault of mod_perl, and it is on a native 64bit platform. -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/ From daniel at rimspace.net Wed Sep 13 20:49:20 2006 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 14 Sep 2006 13:49:20 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <83F1E4E3-468A-416E-96DA-3D9E82FFAE9D@dd.com.au> (Scott Penrose's message of "Thu, 14 Sep 2006 13:40:13 +1000") References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <83F1E4E3-468A-416E-96DA-3D9E82FFAE9D@dd.com.au> Message-ID: <87wt87az0f.fsf@rimspace.net> Scott Penrose writes: > On 14/09/2006, at 13:12, Andrew Speer wrote: >> On Thu, September 14, 2006 11:35 am, Scott Penrose wrote: [...] > My experience with the above is you get the same memory footprint. As > I said, it is not mod_perl, it is Perl that is large. > > I am amused by the 10M process too because our process are normally > about 300MB using perl, and Java Tomcat starts at about 800MB+ - we > have servers that one process is GB for TomCat - but it still runs at > a few hundred hits a second. Although it is slow not because of the > process size but because of what it is doing. TomCat was, last time I checked, fairly misleading: the JVM was doing all sorts of clever mapping tricks to make the garbage collection work. It had a stupid quantity of memory mapped, but almost exclusively sparsely used, and so mostly a "virtual" mapping that didn't have any real backing, not even a page of zeros. A quick check shows that the 200MB each Java instances on one of my servers follows this trend: 200MB, of which almost nothing is actually present. Whee! Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/ From scottp at dd.com.au Wed Sep 13 21:15:02 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 14:15:02 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <871wqfcdu2.fsf@rimspace.net> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> Message-ID: On 14/09/2006, at 13:43, Daniel Pittman wrote: > > Apache also supports FastCGI -- with the original FastCGI module > and the > newer (and more free) FCGI module. Both of these give the same > benefits > as lighttpd and FastCGI, plus the advantages that mod_perl and other > Apache modules provide. > Nice thing about the above is that even though your code is FastCGI, as you mentioned you can still use mod_perl, which means we can still use the filters and auth etc. This come very much down to if you are writing apache or an application. For application I see three ways to go: * Built into Apache - ala PHP, mod_perl etc * External to Apache - ala FastCGI, straight CGI etc * Proxy from Apache - ala mod_jk (remote TomCat) and many many others (usually they have their own internal protocol) If you want to write Apache - e.g. something that uses Subrequest, has access to Apache internals, Authentication, Filtering etc - mod_perl is perfect. If you are writing an app - then I think it depends - my gut feel is that some form of abstraction is best. e.g. writing your 'application' in a more portable way, so that it can run in various forms of the above 3 methods (there are probably more). An example of an application which should exist (probably) in mod_perl is things like a File Manager and Gallery - as it is self referring to internal data - e.g. other images or files. An example of an application which should not (probably) exist in mod_perl (except as a performance boost, although you ca also use FastCGI) - a database application - such as booking system. NOTE RANT START I love programming Catalyst for web applications. It is fantastic to work with. I really HATE that Catalyst duplicates Apache - authentication, filtering etc - that SUX BIG ! I REALLY REALLY HATE applications that do their own authentication - I have never worked on a single one of those types of apps that have not missed at least one file for auth - with a huge security hole - This stems so often from the fact that there is some myth that Apache authentication needs to be basic auth - it can be anything - random if you like, time of day, cookie, SSL signed certificate - what ever you like. It would be nice if you could have auth done via Catalyst in a "TRUST" way - where you can use a simple Catalyst module for testing on the command line (Catalyst can run stand alone) but that in Aapche mode it uses the Apache user method. NOTE RANT END Scott -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Open source developer http://linux.dd.com.au/ scottp at dd.com.au Dismaimer: Open sauce usually ends up never coming out (of the bottle). Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. From scottp at dd.com.au Wed Sep 13 21:16:18 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 14:16:18 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <87wt87az0f.fsf@rimspace.net> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <83F1E4E3-468A-416E-96DA-3D9E82FFAE9D@dd.com.au> <87wt87az0f.fsf@rimspace.net> Message-ID: <5C13D929-D7BD-4CFE-81D6-1FC247ACB760@dd.com.au> On 14/09/2006, at 13:49, Daniel Pittman wrote: > Scott Penrose writes: >> On 14/09/2006, at 13:12, Andrew Speer wrote: >>> On Thu, September 14, 2006 11:35 am, Scott Penrose wrote: > > [...] > >> My experience with the above is you get the same memory footprint. As >> I said, it is not mod_perl, it is Perl that is large. >> >> I am amused by the 10M process too because our process are normally >> about 300MB using perl, and Java Tomcat starts at about 800MB+ - we >> have servers that one process is GB for TomCat - but it still runs at >> a few hundred hits a second. Although it is slow not because of the >> process size but because of what it is doing. > > TomCat was, last time I checked, fairly misleading: the JVM was doing > all sorts of clever mapping tricks to make the garbage collection > work. > > It had a stupid quantity of memory mapped, but almost exclusively > sparsely used, and so mostly a "virtual" mapping that didn't have any > real backing, not even a page of zeros. Maybe all true, but it was eating up swap like CRAZY. Once we increased the machines ram form 1GB (the size of the JVM) to 1.5GB and stopped using swap, most things were ok. Like mod_perl size though, it then does not matter about fork/threads because as we have said - copy on write. Scooter From andrew.speer at isolutions.com.au Wed Sep 13 22:16:40 2006 From: andrew.speer at isolutions.com.au (Andrew Speer) Date: Thu, 14 Sep 2006 14:46:40 +0930 (CST) Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <871wqfcdu2.fsf@rimspace.net> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> Message-ID: <57946.150.101.27.178.1158211000.squirrel@copper.isolutions.com.au> On Thu, September 14, 2006 1:13 pm, Daniel Pittman wrote: > > Only 10MB? Lucky you. One of my clients has around 70MB of footprint > from their mod_perl related code.[1] > > Also, remember that most of that memory is shared between Apache > instances in a copy-on-write fashion. So, for all that you have the > same 70MB each fork you end up with 2MB of extra memory used each time. > > The overall memory figure can be *very* misleading, and it is very hard > to get an impression of the level of private memory a Linux binary uses, > because of the way copy-on-write data is accounted. > Yeah, bad typo there - I meant 100MB. Glad to hear others have similar issues though. I understand that copy on write helps, but as I think you or Scott alluded to - if each one of those processes manipulates a large amount of data, or dynmically 'requires' other modules on the fly then "real" memory can get used fairly quickly. You are right about this happening with any app/infrastructure, but with Apache mod_perl a process may allocate 100MB to generate some dynamic content in one request, then be asked to serve up a tiny static CSS file on the next one - eventually all processes pad out to 100MB, and the server struggles to even services requests for static content (unless MaxRequestsPerChild is reached or other memory management techniques are used). It seems to be "better" (or at least more managable) to say e.g. "OK, 10-20 processes will be dedicated to dynamic content, and can grow to 100MB each, and 40-80 processes will handle dynamic content, and will remain about the same size". Correct me if I am wrong, but you cannot seem to do this with Apache/mod_perl ? Looks like you can with Apache/FastCGI or lighttpd/FastCGI. > >> There are ways and means around this problem, but they all seem a bit >> kludgy - front-end proxy servers, multiple Apache servers (Apache with >> mod_perl for dynamic content, straight Apache for static content). > > ...er, or you could tune your Apache process correctly. That way you > fixed the problem rather than trying to work around it. > Tuning an Apache/mod_perl app to run in a corporate environment with a known or predictable load is fairly straightforward. Tuning the same app to service the most possible connections on a single box with unpredictable load (e.g. public facing) would seem to almost demand two HTTP processes - one for static content, and one for dynamic. I am open to suggestions as to how you could "tune" an Apache process to handle such a situation. > Apache also supports FastCGI -- with the original FastCGI module and the > newer (and more free) FCGI module. Both of these give the same benefits > as lighttpd and FastCGI, plus the advantages that mod_perl and other > Apache modules provide. > Thanks for that - FCGI was the module I meant to refer to. I will have to try out Apache/FastCGI - I have not had a chance yet. Anyway, none of the above was meant to bash mod_perl - I think it is a great piece of software and has let me doing things quickly in Apache that otherwise I would never have been able to do. I was just discussing some of the limitations it seems to have, and the alternatives that are around .. Regards, Andrew Speer From scottp at dd.com.au Wed Sep 13 22:42:35 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 15:42:35 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <57946.150.101.27.178.1158211000.squirrel@copper.isolutions.com.au> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> <57946.150.101.27.178.1158211000.squirrel@copper.isolutions.com.au> Message-ID: BTW. Repeated at the bottom - but I think this is an excellent discussion, bringing up some real good questions, that we don't really have the answers to - yet... On 14/09/2006, at 15:16, Andrew Speer wrote: > I understand that copy on write helps, but as I think you or Scott > alluded > to - if each one of those processes manipulates a large amount of > data, or > dynmically 'requires' other modules on the fly then "real" memory > can get > used fairly quickly. True of any service. > You are right about this happening with any app/infrastructure, but > with > Apache mod_perl a process may allocate 100MB to generate some dynamic True of FastCGI too. That is its point, it loads and keeps loaded that code. What you are talking about though is really aggressive garbage collection. One of the nice advantages of a CGI script, without any other Fast/mod_perl etc code - is that at the end, it is gone - completely garbage collected :-) Every other solution requires that the code does the right thing. But the down side usually way outweigh the upside. Basically that aggressive garbage collections has to be worked around, so people start by adding Cache::*, then using FastCGI, then adding in mod_proxy - etc... - what you end up with is having to do the right thing with your data anyway - thus you end up, with any significant application going down one of two paths: * Slower execution time by aggressive garbage collection * Do the right thing or suffer the memory leak consequences :-) but gain the performance. > content in one request, then be asked to serve up a tiny static > CSS file > on the next one - eventually all processes pad out to 100MB, and the That doesn't matter. Because it is already running, already forked, the speed should be as fast as a normal request. > server struggles to even services requests for static content (unless > MaxRequestsPerChild is reached or other memory management > techniques are > used). Not in my experience. Although if all your applications threads/forks (depending on which apache you use) each do massive memory allocations then you may run out of memory - that of course slows things down because of swap. Assuming you don't hit swap - there is no speed difference. Assuming you do hit swap - then using some other technique of keeping your code running all the time (e.g. a daemon) will suffer the same problem - after all - it does not matter WHCIH process is taking up all the memory - if one apache is small, that won't help if it is in swap - swap is only accessed for pages you access. > It seems to be "better" (or at least more managable) to say e.g. "OK, > 10-20 processes will be dedicated to dynamic content, and can grow to > 100MB each, and 40-80 processes will handle dynamic content, and will > remain about the same size". Correct me if I am wrong, but you > cannot seem > to do this with Apache/mod_perl ? Looks like you can with Apache/ > FastCGI > or lighttpd/FastCGI. My experience is that it is either a poorly configured apache server or problems in code (and this of course could be 3rd party cpan code) or borderline memory hitting swap that causes these speed issues. Yes you can hit the symptom - by being more aggressive with memory - or limiting apache threads with and without perl - but I rather work on the cause. That said of course, if I could not fix the cause I would almost definitely do one of the following: * Move to straight, execute each time CGI - this is useful for things that take up masses of memory but are run rarely - it would be a terrible choice for AJAX (for example). * Move the code to a stand alone daemon - either single threaded non blocking, or other limited choices - and proxy to it (btw, I mean proxy by any protocol you like - not just HTTP Proxy, although that is an option). * Use a scheduler. One bit of code I have generates huge (10s of MB) DEM and other terrain and topology files from about 10GB of raw material and can take anywhere between 1 and 30 minutes - this is scheduled in the background, and the web server just refreshes occasionally to check the status, and the user can exit and get a mail if they like. I have also implemented queuing in this, so that if I get too many, they just have to wait (currently limited to 2 concurrent processes due to the massive memory usage to process the files). More and more applications are serving Javascript that then call AJAX, these have to be on the same domain and port - I see that it is important to have a single HTTP request the user sees for resources as well - the two solutions above >> >>> There are ways and means around this problem, but they all seem a >>> bit >>> kludgy - front-end proxy servers, multiple Apache servers (Apache >>> with >>> mod_perl for dynamic content, straight Apache for static content). >> >> ...er, or you could tune your Apache process correctly. That way you >> fixed the problem rather than trying to work around it. >> > > Tuning an Apache/mod_perl app to run in a corporate environment with a > known or predictable load is fairly straightforward. Tuning the > same app > to service the most possible connections on a single box with > unpredictable load (e.g. public facing) would seem to almost demand > two > HTTP processes - one for static content, and one for dynamic. I am > open to > suggestions as to how you could "tune" an Apache process to handle > such a > situation. Not convinced. I don't have what I would like to call hard data though. I do have lots of data, but I would like to prove this. We can do so. We can write some simple mod_perl modules and some static content and call it with a number of ways for performance testing: * No mod_perl * mod_perl hit regularly (e.g. 1 in 10) but no known memory leaks or large use * mod_perl hit regularly but with a large memory usage, reused, but done in each process (assunming of course we are using forks not threads - or we could share it - another good reason to use mod_perl - you actually save memory by sharing, which is hard to do, except with fairly ordinary shared memory, instead of just threads). * mod_perl hit regularly but with memory leaks - keep an array/hash of the objects appended to, thus each request to mod_perl increases memory until the process exits. The above set of 4 tests would prove conclusively the main question - does the mod_perl code impact on the static content - which my - not so conclusive - tests suggest. >> Apache also supports FastCGI -- with the original FastCGI module >> and the >> newer (and more free) FCGI module. Both of these give the same >> benefits >> as lighttpd and FastCGI, plus the advantages that mod_perl and other >> Apache modules provide. >> > > Thanks for that - FCGI was the module I meant to refer to. I will > have to > try out Apache/FastCGI - I have not had a chance yet. > > Anyway, none of the above was meant to bash mod_perl Not at all - this is VERY constructive. Maybe we can get a bit of mod_perl2 movement in Australia - it is a little slow, mostly because of what Skud said - that most developers don't need to know. > - I think it is a > great piece of software and has let me doing things quickly in > Apache that > otherwise I would never have been able to do. I was just discussing > some > of the limitations it seems to have, and the alternatives that are > around > .. Very excellent discussion. Scooter From scottp at dd.com.au Wed Sep 13 22:53:59 2006 From: scottp at dd.com.au (Scott Penrose) Date: Thu, 14 Sep 2006 15:53:59 +1000 Subject: [Melbourne-pm] Web Performance Testing Message-ID: <969E5C52-FE58-44C4-B760-CD3B41849E39@dd.com.au> What do you guys recommend for Web Performance Testing ? i.e. latency and hits per second on a set of request, tuneable to numbers, times etc. I wrote a suite called STS (literally, Scott's Test Suite) to do this more than 5 years ago, which we still use, but I thought maybe there is some better stuff around. What do people use that is relatively simple etc? Scott -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Open source developer http://linux.dd.com.au/ scottp at dd.com.au Dismaimer: Open sauce usually ends up never coming out (of the bottle). Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. From sergicles at gmail.com Thu Sep 14 00:19:37 2006 From: sergicles at gmail.com (Serg B.) Date: Thu, 14 Sep 2006 17:19:37 +1000 Subject: [Melbourne-pm] Web Performance Testing In-Reply-To: <969E5C52-FE58-44C4-B760-CD3B41849E39@dd.com.au> References: <969E5C52-FE58-44C4-B760-CD3B41849E39@dd.com.au> Message-ID: <1680c5ca0609140019r4300efdakaabd2943548bc962@mail.gmail.com> OpenSTA will do esactly what you need. Open source, very powerful and scriptable (has its own language)... On 14/09/06, Scott Penrose wrote: > What do you guys recommend for Web Performance Testing ? > i.e. latency and hits per second on a set of request, tuneable to > numbers, times etc. > > I wrote a suite called STS (literally, Scott's Test Suite) to do this > more than 5 years ago, which we still use, but I thought maybe there > is some better stuff around. > > What do people use that is relatively simple etc? > > Scott > -- > * - * http://www.osdc.com.au - Open Source Developers Conference * - * > Scott Penrose > Open source developer > http://linux.dd.com.au/ > scottp at dd.com.au > > Dismaimer: Open sauce usually ends up never coming out (of the bottle). > > Please do not send me Word or PowerPoint attachments. > See http://www.gnu.org/philosophy/no-word-attachments.html > > Microsoft is not the answer. It's the question. And the answer is no. > > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > From daniel at rimspace.net Thu Sep 14 00:25:17 2006 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 14 Sep 2006 17:25:17 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: (Scott Penrose's message of "Thu, 14 Sep 2006 14:15:02 +1000") References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> Message-ID: <87zmd29ag2.fsf@rimspace.net> Scott Penrose writes: > On 14/09/2006, at 13:43, Daniel Pittman wrote: > >> Apache also supports FastCGI -- with the original FastCGI module and >> the newer (and more free) FCGI module. Both of these give the same >> benefits as lighttpd and FastCGI, plus the advantages that mod_perl >> and other Apache modules provide. > > Nice thing about the above is that even though your code is FastCGI, > as you mentioned you can still use mod_perl, which means we can still > use the filters and auth etc. Absolutely. I think out of process code is a good thing in general, but it is not always appropriate. It increases latency and context switching, both of which can be killers for filter applications, etc. > This come very much down to if you are writing apache or an > application. [...] > If you want to write Apache - e.g. something that uses Subrequest, has > access to Apache internals, Authentication, Filtering etc - mod_perl > is perfect. Yeah, I agree, although I think we would disagree about where the line is drawn: you seem to push more stuff into Apache than I think is worth the time. [...] > An example of an application which should exist (probably) in mod_perl > is things like a File Manager and Gallery - as it is self referring to > internal data - e.g. other images or files. In both cases I see these as generally bad candidates for in-process work, because: * both perform long running, blocking operations on system resources * both may generate large volumes of dynamic data * both may need to be terminated in resource-exhaustion situations Now, mod_perl works OK in the same situation, but it is nicer to isolate those risky processes away, in my eyes. I can see how folks could disagree with that assessment though. :) Regards, Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/ From daniel at rimspace.net Thu Sep 14 00:31:51 2006 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 14 Sep 2006 17:31:51 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <57946.150.101.27.178.1158211000.squirrel@copper.isolutions.com.au> (Andrew Speer's message of "Thu, 14 Sep 2006 14:46:40 +0930 (CST)") References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> <57946.150.101.27.178.1158211000.squirrel@copper.isolutions.com.au> Message-ID: <87psdy9a54.fsf@rimspace.net> "Andrew Speer" writes: > On Thu, September 14, 2006 1:13 pm, Daniel Pittman wrote: >> >> Only 10MB? Lucky you. One of my clients has around 70MB of footprint >> from their mod_perl related code.[1] [...] > Yeah, bad typo there - I meant 100MB. Glad to hear others have similar > issues though. Uh-huh. In think that my clients lose themselves performance in the process as well, but whatever. That is hardly their worst issue. > I understand that copy on write helps, but as I think you or Scott > alluded to - if each one of those processes manipulates a large amount > of data, or dynmically 'requires' other modules on the fly then "real" > memory can get used fairly quickly. Yes. > You are right about this happening with any app/infrastructure, but with > Apache mod_perl a process may allocate 100MB to generate some dynamic > content in one request, then be asked to serve up a tiny static CSS file > on the next one - eventually all processes pad out to 100MB, and the > server struggles to even services requests for static content (unless > MaxRequestsPerChild is reached or other memory management techniques are > used). This is one reason why I like to decouple the two -- that way my FastCGI process can reset itself if memory use jumped more than 20MB in the last request, or whatever, and not have to take an Apache child with it. As Scott points out, though, MaxRequestsPerChild exists for a very, very good reason -- and everyone should be using it to limit the lifetime of their Apache children, no matter what they do with them. :) [...] > Tuning an Apache/mod_perl app to run in a corporate environment with a > known or predictable load is fairly straightforward. Tuning the same > app to service the most possible connections on a single box with > unpredictable load (e.g. public facing) would seem to almost demand > two HTTP processes - one for static content, and one for dynamic. I am > open to suggestions as to how you could "tune" an Apache process to > handle such a situation. Mostly, setting MaxRequestsPerChild and the maximum number of children based on your worst-case resource use. That way you don't significantly delay requests in the normal case and cope with the worst. Using the Apache2::SizeLimit module also helps: it allows your Perl script to request the Apache child exit early if it has consumed too much memory. The same facility is available for Apache1, but not bundled. This is, essentially, the same facility you use with FastCGI, where you simply exit and get restarted, save applied within Apache. >> Apache also supports FastCGI -- with the original FastCGI module and the >> newer (and more free) FCGI module. Both of these give the same benefits >> as lighttpd and FastCGI, plus the advantages that mod_perl and other >> Apache modules provide. > > Thanks for that - FCGI was the module I meant to refer to. I will have > to try out Apache/FastCGI - I have not had a chance yet. I think in general FCGI is a better solution, but I had some problems with it causing failures of the RT mail submission tool. I never got around to tracking them down, but should one day. > Anyway, none of the above was meant to bash mod_perl - I think it is a > great piece of software and has let me doing things quickly in Apache > that otherwise I would never have been able to do. Oh, likewise. I also think that LigHTTPD is probably a great solution to a bunch of problems. :) Regards, Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/ From scottp at dd.com.au Thu Sep 14 16:45:43 2006 From: scottp at dd.com.au (Scott Penrose) Date: Fri, 15 Sep 2006 09:45:43 +1000 Subject: [Melbourne-pm] Mod_perl2 In-Reply-To: <87zmd29ag2.fsf@rimspace.net> References: <3DF3DF3A-6FCD-4D6F-8E78-26FA77B6C99E@dd.com.au> <57573.150.101.27.178.1158203579.squirrel@copper.isolutions.com.au> <871wqfcdu2.fsf@rimspace.net> <87zmd29ag2.fsf@rimspace.net> Message-ID: On 14/09/2006, at 17:25, Daniel Pittman wrote: > In both cases I see these as generally bad candidates for in-process > work, because: > > * both perform long running, blocking operations on system resources > * both may generate large volumes of dynamic data > * both may need to be terminated in resource-exhaustion situations > > Now, mod_perl works OK in the same situation, but it is nicer to > isolate those risky processes away, in my eyes. I can see how folks > could disagree with that assessment though. :) I don't disagree. The problem with our example above is it is a little over simplified :-) e.g. in my example it uses a image thumbnail code, and a simple template. But of course a gallery could generate images and more that fit into your category. Comes back to the usual answer though - there is more than one way to do it, and they should each be evaluated depending on the specs :-) Scooter From jarich at perltraining.com.au Mon Sep 18 16:46:36 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Tue, 19 Sep 2006 09:46:36 +1000 Subject: [Melbourne-pm] Software Freedom day wrap-up Message-ID: <450F2FDC.7060101@perltraining.com.au> G'day Melbourne PM, Many thanks to Tony, Stephen, Gus, Sam and Alec (from OSDClub) for turning up to Software Freedom Day last Saturday. If I missed seeing you then thanks for turning up as well. We gave out a few flyers about Perl (and Melbourne PM) and lots of OSDC postcards. Hopefully we'll get some new members as well. Kylie did a great job of putting the day together, although we all need to focus a little more on getting the word out in advance of the day for next year. If you'd like to be more involved next year, then now is a good time to volunteer your help. It would be grand if we could get the same kind of attendance next year that VTR used to get to their user group open days. All the best, Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From michael.bombardieri at student.curtin.edu.au Fri Sep 22 01:29:09 2006 From: michael.bombardieri at student.curtin.edu.au (Michael Bombardieri) Date: Fri, 22 Sep 2006 16:29:09 +0800 Subject: [Melbourne-pm] Perl crypto code Message-ID: <1158913749.4217.85.camel@m0.bom> Hi everyone, I'm posting this email here because there isn't a perth-pm list that I know of. I'm a computer science student in Perth, but I used to live in Melbourne (Preston). I've been playing with cryptography in my spare time and a bit of my work is now on Wiretapped.net at . I have 2 questions to ask here: 1. What is the general consensus on the state of Perl6? I read that it supports / will support strict data types kind of like C, which sounds like a great idea. Also, that it will have its own preprocessor. I haven't tried out Parrot/Pugs, so forgive me if this is a dumb question. Are there people actually using Perl6 at the moment or is it still too infantile to do anything useful? 2. How difficult is it to build Perl modules? I've been thinking about integrating some crypto code into Perl via a Crypt::bla module. I know that some CPAN modules are written in Perl and some in C. Are there any good tutorials for writing modules? Thanks for your time. Michael Bombardieri From ddick at aapt.net.au Fri Sep 22 02:19:33 2006 From: ddick at aapt.net.au (David Dick) Date: Fri, 22 Sep 2006 19:19:33 +1000 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <1158913749.4217.85.camel@m0.bom> References: <1158913749.4217.85.camel@m0.bom> Message-ID: <4513AAA5.4070709@aapt.net.au> Michael Bombardieri wrote: >I've been playing with cryptography in my spare time and a bit of my >work is now on Wiretapped.net at >. > > certainly a challenging area to work in. >I have 2 questions to ask here: > >2. How difficult is it to build Perl modules? I've been thinking about >integrating some crypto code into Perl via a Crypt::bla module. I know >that some CPAN modules are written in Perl and some in C. Are there any >good tutorials for writing modules? > > > From looking at the wiretapped stuff, would 'perldoc perltoot' and 'perldoc perlnewmod' be what you are looking for at the moment? Best of luck -Dave From scottp at dd.com.au Fri Sep 22 04:59:15 2006 From: scottp at dd.com.au (Scott Penrose) Date: Fri, 22 Sep 2006 21:59:15 +1000 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <1158913749.4217.85.camel@m0.bom> References: <1158913749.4217.85.camel@m0.bom> Message-ID: <295DDDB2-0D46-4397-A953-1EDCE47CDAAF@dd.com.au> On 22/09/2006, at 18:29, Michael Bombardieri wrote: > Hi everyone, > > I'm posting this email here because there isn't a perth-pm list that I > know of. I'm a computer science student in Perth, but I used to > live in > Melbourne (Preston). > > I've been playing with cryptography in my spare time and a bit of my > work is now on Wiretapped.net at > algorithms/mb/>. > > I have 2 questions to ask here: > > 1. What is the general consensus on the state of Perl6? I read that it > supports / will support strict data types kind of like C, which sounds > like a great idea. Also, that it will have its own preprocessor. I > haven't tried out Parrot/Pugs, so forgive me if this is a dumb > question. > Are there people actually using Perl6 at the moment or is it still too > infantile to do anything useful? No one is actively using Perl 6 that I know of. Pugs is the closest but I am not sure there is any production code. Although you never know. As for strict types you can do that now in Perl 5 using Attributes. e.g. my $AnInteger : INTEGER; Will only be an integer. While my $LimitedNumber : NUMBER(3..7); will only allow integers between 3 and 7 (inclusive). And my $ReallyLimitedName : REGEX(qw/Scott/); Any string in RealLimitedName must contain Scott You can be as limited as you like. There is a slight over head though - as they are effectively objects. > 2. How difficult is it to build Perl modules? I've been thinking about > integrating some crypto code into Perl via a Crypt::bla module. I know > that some CPAN modules are written in Perl and some in C. Are there > any > good tutorials for writing modules? Package MyPerlModule; sub HelloWorld { print "Hello World"; } 1; That is a module above, but if you want a class instead so you can do OO Package MyPerlClass; sub new { my ($class) = @_; return bless {}, ref($class) || $class; } sub set { my ($self, $val) = @_; $self->{VAL} = $val; } sub get { my ($self) = @_; return $self->{VAL}; } sub HelloWorld { my ($self) = @_; print "Hello World - value = " . $self->get . "\n"; } 1; now to use it. use MyPerlClass; my $thing = MyPerlClass->new(); $thing->set('Your new value'); $thing->HelloWorld; The hard part about perl modules is the new method you have to write - understanding bless, and the use of "ref($class) || $class" - which is basically there just to allow inheritance to work and to allow new instances from an existing one. However, you can make it more Java like by adding some helpful modules - such as Class::Maker or others (see CPAN). Good luck with your modules and keep us informed or ask for any more help. Scott From michael.bombardieri at student.curtin.edu.au Fri Sep 22 05:37:34 2006 From: michael.bombardieri at student.curtin.edu.au (Michael Bombardieri) Date: Fri, 22 Sep 2006 20:37:34 +0800 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <4513A52D.3070205@gmail.com> References: <1158913749.4217.85.camel@m0.bom> <4513A52D.3070205@gmail.com> Message-ID: <1158928654.4207.4.camel@m0.bom> On Fri, 2006-09-22 at 18:56 +1000, Alec Clews wrote: > Michael Bombardieri wrote: > > 2. How difficult is it to build Perl modules? I've been thinking about > > integrating some crypto code into Perl via a Crypt::bla module. I know > > that some CPAN modules are written in Perl and some in C. Are there any > > good tutorials for writing modules? > Did you see the attached message from Scott? I am not sure if the offer > has expired, but if you follow the links, register etc. then one of the > free books you can download is about writing CPAN modules. > > If you cant get it any more then let me known, I have a copy (3Mb pdf) > I didn't get Scott's email but I found an apress link and I just downloaded the book from . Thanks for letting me know about the ebook offer. Michael From michael.bombardieri at student.curtin.edu.au Fri Sep 22 06:03:43 2006 From: michael.bombardieri at student.curtin.edu.au (Michael Bombardieri) Date: Fri, 22 Sep 2006 21:03:43 +0800 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <295DDDB2-0D46-4397-A953-1EDCE47CDAAF@dd.com.au> References: <1158913749.4217.85.camel@m0.bom> <295DDDB2-0D46-4397-A953-1EDCE47CDAAF@dd.com.au> Message-ID: <1158930223.4207.20.camel@m0.bom> On Fri, 2006-09-22 at 21:59 +1000, Scott Penrose wrote: > On 22/09/2006, at 18:29, Michael Bombardieri wrote: > > > Hi everyone, > > > > I'm posting this email here because there isn't a perth-pm list that I > > know of. I'm a computer science student in Perth, but I used to > > live in > > Melbourne (Preston). > > > > I've been playing with cryptography in my spare time and a bit of my > > work is now on Wiretapped.net at > > > algorithms/mb/>. > > > > I have 2 questions to ask here: > > > > 1. What is the general consensus on the state of Perl6? I read that it > > supports / will support strict data types kind of like C, which sounds > > like a great idea. Also, that it will have its own preprocessor. I > > haven't tried out Parrot/Pugs, so forgive me if this is a dumb > > question. > > Are there people actually using Perl6 at the moment or is it still too > > infantile to do anything useful? > > No one is actively using Perl 6 that I know of. Pugs is the closest > but I am not sure there is any production code. Although you never know. > > As for strict types you can do that now in Perl 5 using Attributes. > > e.g. > > my $AnInteger : INTEGER; > > Will only be an integer. > > While > > my $LimitedNumber : NUMBER(3..7); > > will only allow integers between 3 and 7 (inclusive). > > And > > my $ReallyLimitedName : REGEX(qw/Scott/); > > Any string in RealLimitedName must contain Scott > > You can be as limited as you like. There is a slight over head though > - as they are effectively objects. > Hey, that's nice. I'd never heard of attributes. I just read 'perldoc attributes'... great to know I can do this kind of thing. > > 2. How difficult is it to build Perl modules? I've been thinking about > > integrating some crypto code into Perl via a Crypt::bla module. I know > > that some CPAN modules are written in Perl and some in C. Are there > > any > > good tutorials for writing modules? > > Package MyPerlModule; > sub HelloWorld { print "Hello World"; } > 1; > > That is a module above, but if you want a class instead so you can do OO > > Package MyPerlClass; > sub new { > my ($class) = @_; > return bless {}, ref($class) || $class; > } > sub set { > my ($self, $val) = @_; > $self->{VAL} = $val; > } > sub get { > my ($self) = @_; > return $self->{VAL}; > } > sub HelloWorld { > my ($self) = @_; > print "Hello World - value = " . $self->get . "\n"; > } > 1; > > now to use it. > > use MyPerlClass; > my $thing = MyPerlClass->new(); > $thing->set('Your new value'); > $thing->HelloWorld; > > The hard part about perl modules is the new method you have to write > - understanding bless, and the use of "ref($class) || $class" - which > is basically there just to allow inheritance to work and to allow new > instances from an existing one. > > However, you can make it more Java like by adding some helpful > modules - such as Class::Maker or others (see CPAN). > > Good luck with your modules and keep us informed or ask for any more > help. > Thanks for the tutorial. Gotta love "hello world". I'll let you guys know how things go with my modules etc. > Scott > > From jarich at perltraining.com.au Fri Sep 22 17:47:00 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Sat, 23 Sep 2006 10:47:00 +1000 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <1158913749.4217.85.camel@m0.bom> References: <1158913749.4217.85.camel@m0.bom> Message-ID: <45148404.6050208@perltraining.com.au> Michael Bombardieri wrote: > I'm posting this email here because there isn't a perth-pm list that I > know of. I'm a computer science student in Perth, but I used to live in > Melbourne (Preston). Welcome! We have many other non-Melbournites on this list too, so don't be embarrassed. There was a Perth PM, but in the end it only had about 5 members and none of them ever posted (well... except for me and I live in Melbourne) so when Davorg started closing down dead PM lists, noone of them argued for it to keep existing so it got closed down. If you want to restart Perth PM, it's very easy to do so. > I have 2 questions to ask here: > > 1. What is the general consensus on the state of Perl6? I read that it > supports / will support strict data types kind of like C, which sounds > like a great idea. Also, that it will have its own preprocessor. I > haven't tried out Parrot/Pugs, so forgive me if this is a dumb question. > Are there people actually using Perl6 at the moment or is it still too > infantile to do anything useful? Perl6 is still in production. Lots of people are working with it and playing with it and doing cool stuff in it; but it's not production ready right now. A good mailing list if you'd like to get involved in it from a users point of view is the perl6-users at perl.org list. List-Subscribe: The language spec is still not completely nailed down, but it's a hell of a lot of fun. > 2. How difficult is it to build Perl modules? I've been thinking about > integrating some crypto code into Perl via a Crypt::bla module. I know > that some CPAN modules are written in Perl and some in C. Are there any > good tutorials for writing modules? Grab our Programming Perl, and Object Oriented Perl course notes from http://perltraining.com.au/notes.html also our "Starting modules with h2xs" perl tip: http://perltraining.com.au/tips/2005-09-26.html The first covers Packages and Modules fairly thoroughly and the second covers any OO basics you might be missing. If you spot any errors please let me know. Building modules in Perl is really easy (and encouraged). If you want to package them up and send them off to CPAN then you'll probably want to start with h2xs as mentioned in the tip, as it ensures you get the basic files up and ready. Good luck with it! J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From ajsavige at yahoo.com.au Fri Sep 22 20:01:15 2006 From: ajsavige at yahoo.com.au (Andrew Savige) Date: Sat, 23 Sep 2006 13:01:15 +1000 (EST) Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <45148404.6050208@perltraining.com.au> Message-ID: <20060923030115.25061.qmail@web56409.mail.re3.yahoo.com> --- Jacinta Richardson wrote: > Michael Bombardieri wrote: >> 2. How difficult is it to build Perl modules? I've been thinking about >> integrating some crypto code into Perl via a Crypt::bla module. I know >> that some CPAN modules are written in Perl and some in C. Are there any >> good tutorials for writing modules? > > Grab our Programming Perl, and Object Oriented Perl course notes from > http://perltraining.com.au/notes.html also our "Starting modules with h2xs" > perl tip: http://perltraining.com.au/tips/2005-09-26.html > > The first covers Packages and Modules fairly thoroughly and the second covers > any OO basics you might be missing. If you spot any errors please let me > know. > Building modules in Perl is really easy (and encouraged). If you want to > package them up and send them off to CPAN then you'll probably want to start > with h2xs as mentioned in the tip, as it ensures you get the basic files up > and ready. In case you need any more references on writing CPAN modules: * http://www.perlmonks.org/?node_id=158999 (How to make a CPAN Module Distribution) * http://www.perlmonks.org/?node_id=102347 (Simple Module Tutorial) * http://www.perlmonks.org/?node_id=431702 (Jose's Guide for creating CPAN modules) * http://www.perlmonks.org/?node_id=418891 (Writing Solid CPAN Modules) * http://www.apress.com/free/index.html (Writing Perl Modules for CPAN by Sam Tregar, freely downloadable APress book) Cheers, /-\ ____________________________________________________ On Yahoo!7 360? new features: Blog polls, visitor stats custom themes and more! http://www.yahoo7.com.au/360 From shlomif at iglu.org.il Sat Sep 23 01:35:56 2006 From: shlomif at iglu.org.il (Shlomi Fish) Date: Sat, 23 Sep 2006 11:35:56 +0300 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <45148404.6050208@perltraining.com.au> References: <1158913749.4217.85.camel@m0.bom> <45148404.6050208@perltraining.com.au> Message-ID: <200609231135.56722.shlomif@iglu.org.il> Hi all! This is my first post to this list. I'm not living in Melbourne, either, but rather am an Israeli. You can learn more about me on my homesite: http://www.shlomifish.org/ . In any case, I've been helping Simon Taylor and Becky Alcorn (who are living in Melbourne, IIRC) with perlmeme.org. Now back to the issue at hand. On Saturday 23 September 2006 03:47, Jacinta Richardson wrote: > > 2. How difficult is it to build Perl modules? I've been thinking about > > integrating some crypto code into Perl via a Crypt::bla module. I know > > that some CPAN modules are written in Perl and some in C. Are there any > > good tutorials for writing modules? > > Grab our Programming Perl, and Object Oriented Perl course notes from > http://perltraining.com.au/notes.html also our "Starting modules with > h2xs" perl tip: http://perltraining.com.au/tips/2005-09-26.html > Regarding h2xs, one should probably prefer module-starter: http://search.cpan.org/dist/Module-Starter/ It is more modern, and also is pluginnable: http://search.cpan.org/search?query=module-starter&mode=all h2xs may still be useful if you'd like to generate module templates that will also be compatible with older versions of perl5. Regards, Shlomi Fish --------------------------------------------------------------------- Shlomi Fish shlomif at iglu.org.il Homepage: http://www.shlomifish.org/ Chuck Norris wrote a complete Perl 6 implementation in a day but then destroyed all evidence with his bare hands, so no one will know his secrets. From scottp at dd.com.au Sun Sep 24 03:18:39 2006 From: scottp at dd.com.au (Scott Penrose) Date: Sun, 24 Sep 2006 20:18:39 +1000 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: <200609231135.56722.shlomif@iglu.org.il> References: <1158913749.4217.85.camel@m0.bom> <45148404.6050208@perltraining.com.au> <200609231135.56722.shlomif@iglu.org.il> Message-ID: On 23/09/2006, at 18:35, Shlomi Fish wrote: > > Regarding h2xs, one should probably prefer module-starter: > > http://search.cpan.org/dist/Module-Starter/ Agreed, avoid h2xs if you can :-) > It is more modern, and also is pluginnable: > > http://search.cpan.org/search?query=module-starter&mode=all > > h2xs may still be useful if you'd like to generate module templates > that will > also be compatible with older versions of perl5. I can't find it right now (not online) but you can generate your Makefile.PL from your Build.PL - so you can still generate backwards compatible Perl5 stuff with Module-Starter. Scott -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose Welcome to the Digital Dimension http://www.dd.com.au/ scottp at 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. Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. From jarich at perltraining.com.au Thu Sep 28 00:25:24 2006 From: jarich at perltraining.com.au (jarich at perltraining.com.au) Date: Thu, 28 Sep 2006 17:25:24 +1000 (EST) Subject: [Melbourne-pm] Registrations are open for OSDC 2006 Message-ID: <20060928072524.B7CF2110084@teddybear.perltraining.com.au> Registrations are open for the Open Source Developers' Conference 2006: http://www.osdc.com.au/registration/index.html Book before 31st October to save $50 and get a free conference t-shirt! The Open Source Developers' Conference is an Australian conference covering talks about software development for open source languages and projects; regardless of operating system. The technical program is running from 6th - 8th December 2006 and will be held in Melbourne, Victoria (at Monash University's Caulfield Campus). We are planning to have 3 streams of talks over the three days with combined keynotes at the start and end of each day. Morning and afternoon teas, and lunch will be provided. A conference dinner will be held on the night of the 6th. Talks this year include: - "Mono - Migrating from Windows to Linux" by Dr. Trent Mifsud, Lecturer for the Faculty of Information Technology, Monash University - "Data Warehousing HOWTO" by Evan Leybourn, Director of Looking Glass Solutions - "J2EE and Open Source Innovation: The Relationship between Open Source and Standards" by Keith Pitty, Senior Consultant at Cirrus Technologies Pty Ltd - "Enterprise PHP" by Thorsten Rinne, Software Developer at Mayflower GmbH / ThinkPHP - "Obfuscation, Golfing and Secret Operators in Perl" by Jos? Castro, Team Leader at log - "A Rails/Django Comparison" by Alan Green, Cirrus Technologies and Ben Askins, Sterland Computing For a full list please visit: http://osdc2006.cgpublisher.com/session_descriptions.html Conference keynote presentors include Damian Conway, Randal L. Schwartz, Richard Farnsworth and others. On the 5th of December we are running a number of short tutorials. These cover Cascading Style Sheets, Open Source Python GIS Hacks, Testing Web Applications with Perl, a Drupal Tutorial, an Introduction to Perl Template Toolkit and Building Large Scale Web Apps. For more information please visit: http://www.osdc.com.au/papers/tutorials.html We look forward to sharing this great conference with you. Jacinta Richardson OSDC Publicity Officer From shlomif at iglu.org.il Fri Sep 29 06:46:56 2006 From: shlomif at iglu.org.il (Shlomi Fish) Date: Fri, 29 Sep 2006 16:46:56 +0300 Subject: [Melbourne-pm] Perl crypto code In-Reply-To: References: <1158913749.4217.85.camel@m0.bom> <200609231135.56722.shlomif@iglu.org.il> Message-ID: <200609291646.56454.shlomif@iglu.org.il> On Sunday 24 September 2006 13:18, Scott Penrose wrote: > On 23/09/2006, at 18:35, Shlomi Fish wrote: > > Regarding h2xs, one should probably prefer module-starter: > > > > http://search.cpan.org/dist/Module-Starter/ > > Agreed, avoid h2xs if you can :-) > > > It is more modern, and also is pluginnable: > > > > http://search.cpan.org/search?query=module-starter&mode=all > > > > h2xs may still be useful if you'd like to generate module templates > > that will > > also be compatible with older versions of perl5. > > I can't find it right now (not online) but you can generate your > Makefile.PL from your Build.PL - so you can still generate backwards > compatible Perl5 stuff with Module-Starter. Actually, that's not what I meant. Module-Starter can generate ExtUtils::MakeMaker-based distros with a Makefile.PL. However, the code that it puts inside the module is more modern and may only work on a modern perl. With h2xs, on the other hand, one can specify the version of perl that the skeleton will be able to run on. Regards, Shlomi Fish --------------------------------------------------------------------- Shlomi Fish shlomif at iglu.org.il Homepage: http://www.shlomifish.org/ Chuck Norris wrote a complete Perl 6 implementation in a day but then destroyed all evidence with his bare hands, so no one will know his secrets.