From shijialee at gmail.com Sat Mar 1 06:20:42 2008 From: shijialee at gmail.com (Qiang ( James ) Li) Date: Sat, 01 Mar 2008 09:20:42 -0500 Subject: [PerlChina] =?gb2312?b?cGVybLXExNq05rncwO3OyszioaM=?= In-Reply-To: <3aac2b3b0802291810w4190c78ax1d4019b5fcdb24af@mail.gmail.com> References: <3aac2b3b0802291810w4190c78ax1d4019b5fcdb24af@mail.gmail.com> Message-ID: <47C9663A.5070709@gmail.com> rorot wrote: > 大家好, > > 我用perl的HTML::DOM 解析约7万个HTML页面内容。结果发现没解析2,000个左 > 右,脚本程序就出现一次崩溃。错误信息为内存占用过多,被操作系统杀死。 > > 我不知道如何去DEBUG一个perl脚本,跟踪到底那部分没有释放内存。但是可 > 以肯定的是我的程序是运行一个sub foo()循环,这个sub里的new Object()都被我 > 调用过object->close(),也就是文档里说的destroy操作。为什么持续运行程序, > 内存暴涨,从10M一直上升到580MB然后被操作系统杀死。。。 > > 能告诉我如何去调试一个perl程序, 或者直接找出那里出现内存泄露吗? 或 > 者还是perl的内存管理释放内存的时间太慢??? > 先试试 truncatei 所说的. 关于 Perl 的 Profiling.. 使用 Devel::DProf ( 或 Devel::Profiler ) , 这里是两篇介绍文章 http://www.perl.com/pub/a/2004/06/25/profiling.html http://mailman.anu.edu.au/pipermail/perl.sig/2005-July/000011.html 另外还有 Devel::Leak::Object 如果还有问题,把相关的程序贴上来吧. > rorot > Mar/01/2008 > > Qiang From fayland at gmail.com Sat Mar 1 19:29:54 2008 From: fayland at gmail.com (Fayland Lam) Date: Sun, 02 Mar 2008 11:29:54 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Code -- volunteers needed] Message-ID: <47CA1F32.3020307@gmail.com> -------- Original Message -------- Subject: [pm_groups] Summer of Code -- volunteers needed Date: Sat, 1 Mar 2008 19:03:41 -0800 From: Eric Wilhelm To: pm_groups at pm.org Hi all, Volunteer pledge drive! Please forward this to your local PM groups. TPF needs volunteers to make summer of code happen this year. It sounds like the administrators got stretched too thin in 2005 and 2006, and we really didn't have ourselves together in 2007. So, I'm proposing a departmental structure under a TPF umbrella, which will localize the cat-herding effects within various large projects (so far, parrot and Catalyst appear to be on board with this.) I would like to demonstrate that we have our act together this year, so we need to get a solid pool of administrative volunteers and mentors together before the 8th. Administrative needs: (Contact ewilhelm at cpan.org or join #soc on irc.perl.org.) * backup administrator (reduce the bus number) * Department heads for p5p, "modules", etc * Suggestions about department structure Mentors and project ideas needed: We need to get these pages populated before March 8th or it is quite likely to be a no-go. Potential mentors, please add yourselves and your project ideas here: http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_mentors http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects If you hate wikis as much as I do, please visit this handy form and I will batch the wiki edits on your behalf. http://scratchcomputing.com/loveperlhatewiki.html Thanks, Eric -- We who cut mere stones must always be envisioning cathedrals. --Quarry worker's creed --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From wanmyome at gmail.com Sat Mar 1 21:20:04 2008 From: wanmyome at gmail.com (=?UTF-8?B?5LiH5pyd5Lyf?=) Date: Sun, 2 Mar 2008 13:20:04 +0800 Subject: [PerlChina] =?utf-8?b?YmJzLnBlcmxjaGluYS5vcmfmiYDlnKjmnI3liqE=?= =?utf-8?b?5Zmo6YGt5Y+XQVJQ5pS75Ye777yM6LCB5pyJ5aW955qE5bu66K6u?= Message-ID: <9ff89e80803012120g16d3f206ud7de5140c6956057@mail.gmail.com> 服务器是一台FreeBSD服务器,机房里其他服务器有病毒,这台服务器成了被攻击对象。 具体表现为,访问这台服务器上的任何一个网站都有被挂马的可能 大家有什么好的建议 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080302/3f744159/attachment.html From shijialee at gmail.com Sat Mar 1 21:55:47 2008 From: shijialee at gmail.com (Qiang ( James ) Li) Date: Sun, 02 Mar 2008 00:55:47 -0500 Subject: [PerlChina] =?utf-8?b?562U5aSNOiAgRndkOiBUcnkgdGhlIG5ldyBKb3Rz?= =?utf-8?q?pot=2C_Google_Sites?= In-Reply-To: <47C82A29.7010302@gmail.com> References: <20080228175121.28941.qmail@cg-out-0102.google.com> <20b2921e0802281724h1161534ej5d5bc4516d58b6a7@mail.gmail.com> <47C76144.4020306@gmail.com> <000601c87adc$6ef89dc0$4ce9d940$@com> <47C82A29.7010302@gmail.com> Message-ID: <47CA4163.6040806@gmail.com> Fayland Lam wrote: > I tried. china-pm at pm.org is not acceptable and I don't know which > country is acceptable (US, HK and CN are not). > hmm > google site 是给域名用户使用的,你必须拥有哪个域名才可以使用这个服务. 咱 们 PerlChina 已经使用了 google 提供的 email 服务 (mail.perlchina.org), google site 的功能也是打开的, 只不过我没有时间试. 不过看简短的介绍感觉不 适合咱们. Qiang > > Bruce Cheng wrote: >> Agree >> >> -----邮件原件----- >> 发件人: china-pm-bounces+bruce1914=gmail.com at pm.org [mailto:china-pm-bounces+bruce1914=gmail.com at pm.org] 代表 Fayland Lam >> 发送时间: 2008年2月29日 9:35 >> 收件人: china-pm at pm.org >> 主题: Re: [PerlChina] Fwd: Try the new Jotspot, Google Sites >> >> 朱珠 wrote: >> >>> Let us try? >>> >> sounds nice. for China-pm? >> >> >>> ---------- Forwarded message ---------- >>> From: *The Google Apps Team* >> > >>> Date: 28 Feb 2008 17:51:21 -0000 >>> Subject: Try the new Jotspot, Google Sites >>> To: zhuzhu at perlchina.org >>> >>> Greetings! >>> >>> We're contacting everyone who's expressed interest in learning of >>> JotSpot registration re-openings on the JotSpot website. And >>> today, we're excited to announce that JotSpot is working on Google >>> infrastructure and has been re-launched as Google Sites. >>> >>> Google Sites is the latest offering from Google Apps, a suite of >>> products designed to improve communication and collaboration >>> amongst employees, students, and groups. Google Sites makes >>> creating a team web site as easy as editing a document. You can >>> quickly gather a variety of information in one place -- including >>> videos, calendars, presentations, attachments, and gadgets -- and >>> easily share it for viewing or editing with a small group, their >>> entire organization, or the world. >>> >>> To get started with Google Sites, you'll first need to sign up for >>> the Google Apps edition that's right for you (if you're not >>> already a Google Apps user). Start the sign-up process at: >>> >>> http://sites.google.com >>> >>> Sincerely, >>> >>> >>> The Google Apps Team >>> Google Inc. >>> 1600 Amphitheatre Parkway >>> Mountain View, CA 94043 >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> China-pm mailing list >>> China-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/china-pm >>> >> >> > > From truncatei at gmail.com Sat Mar 1 22:36:02 2008 From: truncatei at gmail.com (truncatei) Date: Sun, 2 Mar 2008 14:36:02 +0800 Subject: [PerlChina] =?utf-8?b?YmJzLnBlcmxjaGluYS5vcmfmiYDlnKjmnI3liqE=?= =?utf-8?b?5Zmo6YGt5Y+XQVJQ5pS75Ye777yM6LCB5pyJ5aW955qE5bu66K6u?= In-Reply-To: <9ff89e80803012120g16d3f206ud7de5140c6956057@mail.gmail.com> References: <9ff89e80803012120g16d3f206ud7de5140c6956057@mail.gmail.com> Message-ID: 机房的路由器不能做Mac地址绑定吗? 2008/3/2 万朝伟 : > 服务器是一台FreeBSD服务器,机房里其他服务器有病毒,这台服务器成了被攻击对象。 > 具体表现为,访问这台服务器上的任何一个网站都有被挂马的可能 > 大家有什么好的建议 > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080302/97fe26a1/attachment.html From jameswork66 at gmail.com Sun Mar 2 04:46:53 2008 From: jameswork66 at gmail.com (james zheng) Date: Sun, 2 Mar 2008 20:46:53 +0800 Subject: [PerlChina] =?gb2312?b?YmJzLnBlcmxjaGluYS5vcmfL+dTat/7O8cb31OI=?= =?gb2312?b?ytxBUlC5pbv3o6zLrdPQusO1xL2o0uk=?= In-Reply-To: <9ff89e80803012120g16d3f206ud7de5140c6956057@mail.gmail.com> References: <9ff89e80803012120g16d3f206ud7de5140c6956057@mail.gmail.com> Message-ID: <2e766b860803020446q8226676g4593b03a1a9795af@mail.gmail.com> 加个arping 和arp 到cronttab里, 也许有点用。 2008/3/2 万朝伟 : > 服务器是一台FreeBSD服务器,机房里其他服务器有病毒,这台服务器成了被攻击对象。 > 具体表现为,访问这台服务器上的任何一个网站都有被挂马的可能 > 大家有什么好的建议 > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080302/05c26aa1/attachment.html From tigerpeng2001 at yahoo.com Wed Mar 5 10:21:06 2008 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Wed, 5 Mar 2008 10:21:06 -0800 (PST) Subject: [PerlChina] =?utf-8?b?cGVybOeahOWGheWtmOeuoeeQhumXrumimOOAgg==?= Message-ID: <962999.20757.qm@web58704.mail.re1.yahoo.com> 1, Check if your HTML::DOM version. Should it be updated? 2, Sample workaround: Do not 解析 too many pages in one process: stop and restart the process for every 1 ~ n pages. ----- Original Message ---- From: rorot To: China-pm at pm.org Sent: Friday, February 29, 2008 8:10:32 PM Subject: [PerlChina] perl的内存管理问题。 大家好, 我用perl的HTML::DOM 解析约7万个HTML页面内容。结果发现没解析2,000个左右,脚本程序就出现一次崩溃。错误信息为内存占用过多,被操作系统杀死。 我不知道如何去DEBUG一个perl脚本,跟踪到底那部分没有释放内存。但是可以肯定的是我的程序是运行一个sub foo()循环,这个sub里的new Object()都被我调用过object->close(),也就是文档里说的destroy操作。为什么持续运行程序,内存暴涨,从10M一直上升到580MB然后被操作系统杀死。。。 能告诉我如何去调试一个perl程序, 或者直接找出那里出现内存泄露吗? 或者还是perl的内存管理释放内存的时间太慢??? rorot Mar/01/2008 -----Inline Attachment Follows----- _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080305/6ea288cd/attachment.html From yang.liana at gmail.com Wed Mar 5 19:49:14 2008 From: yang.liana at gmail.com (rorot) Date: Thu, 6 Mar 2008 11:49:14 +0800 Subject: [PerlChina] =?gb2312?b?cGVybLXExNq05rncwO3OyszioaM=?= In-Reply-To: <962999.20757.qm@web58704.mail.re1.yahoo.com> References: <962999.20757.qm@web58704.mail.re1.yahoo.com> Message-ID: <3aac2b3b0803051949pd8e97a3k3b6b94b1471fa3c7@mail.gmail.com> 谢谢以上诸位。 如Tiger peng所说,我暂时这么解决,每隔1000个pages作为一个Process来处理。然后退出,再启动一个新的Process,如此循环。 PS. 我的HTML::DOM是最新版本。0.010 (Alpha). rorot 2008/3/6 tiger peng : > 1, Check if your HTML::DOM version. Should it be updated? > 2, Sample workaround: Do not 解析 too many pages in one process: stop and > restart the process for every 1 ~ n pages. > > ----- Original Message ---- > From: rorot > To: China-pm at pm.org > Sent: Friday, February 29, 2008 8:10:32 PM > Subject: [PerlChina] perl的内存管理问题。 > > 大家好, > > 我用perl的HTML::DOM > 解析约7万个HTML页面内容。结果发现没解析2,000个左右,脚本程序就出现一次崩溃。错误信息为内存占用过多,被操作系统杀死。 > > 我不知道如何去DEBUG一个perl脚本,跟踪到底那部分没有释放内存。但是可以肯定的是我的程序是运行一个sub > foo()循环,这个sub里的new > Object()都被我调用过object->close(),也就是文档里说的destroy操作。为什么持续运行程序,内存暴涨,从10M一直上升到580MB然后被操作系统杀死。。。 > > 能告诉我如何去调试一个perl程序, 或者直接找出那里出现内存泄露吗? 或者还是perl的内存管理释放内存的时间太慢??? > > rorot > Mar/01/2008 > > > > -----Inline Attachment Follows----- > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080306/4e603f19/attachment.html From ximiff at gmail.com Wed Mar 5 19:50:44 2008 From: ximiff at gmail.com (ximiff) Date: Thu, 6 Mar 2008 11:50:44 +0800 Subject: [PerlChina] =?gb2312?b?cGVybLXExNq05rncwO3OyszioaM=?= References: <962999.20757.qm@web58704.mail.re1.yahoo.com>, <3aac2b3b0803051949pd8e97a3k3b6b94b1471fa3c7@mail.gmail.com> Message-ID: <200803061150417655304@gmail.com> 把内存回收交给系统还是比较放心的 ximiff 2008-03-06 发件人: rorot 发送时间: 2008-03-06 11:50:17 收件人: china-pm at pm.org 抄送: 主题: Re: [PerlChina]perl的内存管理问题。 谢谢以上诸位。 如Tiger peng所说,我暂时这么解决,每隔1000个pages作为一个Process来处理。然后退出,再启动一个新的Process,如此循环。 PS. 我的HTML::DOM是最新版本。0.010 (Alpha). rorot 2008/3/6 tiger peng : 1, Check if your HTML::DOM version. Should it be updated? 2, Sample workaround: Do not 解析 too many pages in one process: stop and restart the process for every 1 ~ n pages. ----- Original Message ---- From: rorot To: China-pm at pm.org Sent: Friday, February 29, 2008 8:10:32 PM Subject: [PerlChina] perl的内存管理问题。 大家好, 我用perl的HTML::DOM 解析约7万个HTML页面内容。结果发现没解析2,000个左右,脚本程序就出现一次崩溃。错误信息为内存占用过多,被操作系统杀死。 我不知道如何去DEBUG一个perl脚本,跟踪到底那部分没有释放内存。但是可以肯定的是我的程序是运行一个sub foo()循环,这个sub里的new Object()都被我调用过object->close(),也就是文档里说的destroy操作。为什么持续运行程序,内存暴涨,从10M一直上升到580MB然后被操作系统杀死。。。 能告诉我如何去调试一个perl程序, 或者直接找出那里出现内存泄露吗? 或者还是perl的内存管理释放内存的时间太慢??? rorot Mar/01/2008 -----Inline Attachment Follows----- _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080306/7224faa0/attachment.html From ximiff at gmail.com Wed Mar 5 19:50:44 2008 From: ximiff at gmail.com (ximiff) Date: Thu, 6 Mar 2008 11:50:44 +0800 Subject: [PerlChina] =?gb2312?b?cGVybLXExNq05rncwO3OyszioaM=?= References: <962999.20757.qm@web58704.mail.re1.yahoo.com>, <3aac2b3b0803051949pd8e97a3k3b6b94b1471fa3c7@mail.gmail.com> Message-ID: <200803061150417655304@gmail.com> 把内存回收交给系统还是比较放心的 ximiff 2008-03-06 发件人: rorot 发送时间: 2008-03-06 11:50:17 收件人: china-pm at pm.org 抄送: 主题: Re: [PerlChina]perl的内存管理问题。 谢谢以上诸位。 如Tiger peng所说,我暂时这么解决,每隔1000个pages作为一个Process来处理。然后退出,再启动一个新的Process,如此循环。 PS. 我的HTML::DOM是最新版本。0.010 (Alpha). rorot 2008/3/6 tiger peng : 1, Check if your HTML::DOM version. Should it be updated? 2, Sample workaround: Do not 解析 too many pages in one process: stop and restart the process for every 1 ~ n pages. ----- Original Message ---- From: rorot To: China-pm at pm.org Sent: Friday, February 29, 2008 8:10:32 PM Subject: [PerlChina] perl的内存管理问题。 大家好, 我用perl的HTML::DOM 解析约7万个HTML页面内容。结果发现没解析2,000个左右,脚本程序就出现一次崩溃。错误信息为内存占用过多,被操作系统杀死。 我不知道如何去DEBUG一个perl脚本,跟踪到底那部分没有释放内存。但是可以肯定的是我的程序是运行一个sub foo()循环,这个sub里的new Object()都被我调用过object->close(),也就是文档里说的destroy操作。为什么持续运行程序,内存暴涨,从10M一直上升到580MB然后被操作系统杀死。。。 能告诉我如何去调试一个perl程序, 或者直接找出那里出现内存泄露吗? 或者还是perl的内存管理释放内存的时间太慢??? rorot Mar/01/2008 -----Inline Attachment Follows----- _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080306/7224faa0/attachment-0003.html From fayland at gmail.com Tue Mar 11 23:32:20 2008 From: fayland at gmail.com (Fayland Lam) Date: Wed, 12 Mar 2008 14:32:20 +0800 Subject: [PerlChina] [Fwd: [Perl-tips] Perl 5.10: Switch (given and when)] Message-ID: <47D778F4.80108@gmail.com> -------- Original Message -------- Subject: [Perl-tips] Perl 5.10: Switch (given and when) Date: Wed, 12 Mar 2008 17:22:17 +1100 From: Jacinta Richardson Reply-To: contact at perltraining.com.au Organization: Perl Training Australia Pty Ltd To: perl-tips at perltraining.com.au ==== Upcoming Programming Perl course in Sydney ==== Our next Programming Perl course in Sydney will run on the 1st - 4th April. Book now to secure your place. http://perltraining.com.au/bookings/Sydney.html == Switch (given and when) == Perl 5.10 introduces a native switch statement into the language. Like other features in Perl 5.10, we can enable it with the ``use feature'' pragma. use feature qw(switch); It's also possible to enable all Perl 5.10 features with any of the following: use feature qw(:5.10); use 5.10.0; # Requires perl v5.10.0 or later. use 5.010; # Same, with nicer errors on older versions. Perl's new ``switch'' feature is best demonstrated with an example. Let's take the classic guessing game, where the computer picks a number and our user needs to try and guess it. use strict; use warnings; use feature qw(switch say); # Pick our random number between 1 and 100 my $secret = int(rand 100)+1; # An array of numbers guessed thus far my @guessed; say "Guess my number between 1-100"; # Get each guess from the user while (my $guess = ) { chomp $guess; # Check their guess using given/when given($guess) { when (/\D/) { say "Give me an integer"; } when (@guessed) { say "You've tried that"; } when ($secret) { say "Just right!"; last; } when ($_ < $secret) { say "Too low"; continue; } when ($_ > $secret) { say "Too high"; continue; } # record the guess they've made push(@guessed,$_); } } The heart of our program is the ``given''/``when'' block, which is enabled by the use of ``use feature qw(switch)'' at the top of our code. Let's look at each part in detail: ``given($guess)'' A ``given'' construct marks the start of our switch logic. It has the effect as assigning $_ to $guess for the duration of our ``given'' block. The changes to $_ are not visible outside of the ``given'' block (ie, they are lexical in scope). ``when (/\D/)'' ``when'' provided with a regular expression checks to see if $_ matches that regular expression. In our case, if our input contains non-digit characters, then we have something that doesn't look like an integer, and execute the associated block. After a successful ``when'' match Perl will automatically break out of the ``given'' block unless told otherwise. In our case this repeats the loop asking the user for another guess. ``when (@guessed)'' In this second test we're asking whether $guess appears as a value in the @guessed. If it does we inform the user and go onto their next guess. ``when ($secret)'' This is a direct comparison. Is $guess the same value as $secret?. If so the player has guessed correctly! Using ``last'' allows us to break out of our ``while'' loop, ending the game. `` and ``> These final two tests are simple comparisons. Remember that $_ contains the item we were ``given''. We've used ``continue'' for these statements to say that Perl should not break out of our ``given'' block on a successful match. This means that if the user guesses too low or too high, we will eventually evaluate the line: push(@guesses,$guess); which remembers the guess as one we've already seen. You can also use ``when'' with hashes (is $_ a key in the hash), subroutines (does the subroutine return true with $_ as an argument) and strings (tests for string equality). Furthermore, our given expression need not be merely a number or a string, we can also compare arrays, and hashes if we want to. Finally, we can also set a default case, for when nothing has matched, although we have not shown it in our example. == foreach / when == If you've enabled ``use feature qw(switch'' then you can also use a ``foreach/when'' construct. Here's an example of tallying up the number of times we see cool things in a list: use feature qw(switch); foreach (@cool_things) { when (/pirate/) { $pirate++ } when (/ninja/) { $ninja++ } when (/robot/) { $robot++ } say "$_ doesn't look cool..."; } If a ``when'' is activated, it automatically goes onto the next iteration of the ``foreach'' loop. Just like ``given/while'', we can use the ``continue'' keyword to continue examining later options after a successful match. It should be noted that ``foreach/when'' only works when using Perl's default $_ variable for iteration. == Lexical $_ == In Perl 5.10 we can write: my $_; This is allows us to do anything we like with $_, but without the possibility of changing $_ for code outside our current block. It's strongly recommended for subroutines using $_ in Perl 5.10 to avoid accidentally changing $_ for your caller. == More information == For further information, we recommend the following resources: : Perldelta - What is new for Perl 5.10.0 : Perlsyn - Perl syntax ==== Upcoming Courses in Canberra ==== Programming Perl 6th - 9th May 2008 ==== Upcoming Courses in Melbourne ==== Object Oriented Perl 20th - 21st May 2008 Database Programming with Perl 22nd - 23rd May 2008 Programming Perl 3th - 6th March 2008 ==== Upcoming Courses in Sydney ==== Programming Perl 1st - 4th April 2008 Object Oriented Perl 17th - 18th June 2008 Database Programming with Perl 19th - 20th June 2008 ==== Corporate Courses ==== Do you have a large group, or the need for training at a particular time? Perl Training Australia is happy to arrange a course in the time and place that best suits you. For more information read our page on Corporate Courses at http://perltraining.com.au/corporate.html or call us on +61-3-9354-6001. _______________________________________________ This Perl tooltip and associated text is Copyright Perl Training Australia. You may freely distribute this text so long as it is distributed in full with this Copyright noticed attached. If you have any questions please don't hesitate to contact us: Email: contact at perltraining.com.au Phone: 03 9354 6001 Perl-tips mailing list To change your subscription details visit: http://perltraining.com.au/cgi-bin/mailman/listinfo/perl-tips -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From cuiyuming at gmail.com Mon Mar 17 00:26:00 2008 From: cuiyuming at gmail.com (cui robin) Date: Mon, 17 Mar 2008 15:26:00 +0800 Subject: [PerlChina] =?gb2312?b?tPO80tPQvatEQklDus1KU09OveG6z8bwwLTTw7n9?= =?gb2312?b?w7Sjvw==?= Message-ID: <1331ce590803170026y7c3e9fb1j1b3738909141ea84@mail.gmail.com> Hi,all 我正在使用catalyst来构建一个站点,客户端使用了yahoo的YUI,希望请求得到的数据是JSON格式的。 可我现在不知道如何将DBIC模块得到的数据转换成JSON格式的字串? DBIC的结果都是object, 大家有知道怎么转换么, 有现成的模块可以用么? robin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080317/c07795fb/attachment.html From haidongj at gmail.com Mon Mar 17 00:28:11 2008 From: haidongj at gmail.com (haidong jia) Date: Mon, 17 Mar 2008 15:28:11 +0800 Subject: [PerlChina] =?gb2312?b?tPO80tPQvatEQklDus1KU09OveG6z8bwwLTTw7n9?= =?gb2312?b?w7Sjvw==?= In-Reply-To: <1331ce590803170026y7c3e9fb1j1b3738909141ea84@mail.gmail.com> References: <1331ce590803170026y7c3e9fb1j1b3738909141ea84@mail.gmail.com> Message-ID: js提供一个json的转换函数可以查一下,你用的是ext2吧 2008/3/17 cui robin : > Hi,all > > 我正在使用catalyst来构建一个站点,客户端使用了yahoo的YUI,希望请求得到的数据是JSON格式的。 > > 可我现在不知道如何将DBIC模块得到的数据转换成JSON格式的字串? > > DBIC的结果都是object, 大家有知道怎么转换么, 有现成的模块可以用么? > > > robin > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080317/84c07ac1/attachment.html From fayland at gmail.com Mon Mar 17 00:32:01 2008 From: fayland at gmail.com (Fayland Lam) Date: Mon, 17 Mar 2008 15:32:01 +0800 Subject: [PerlChina] =?gb2312?b?tPO80tPQvatEQklDus1KU09OveG6z8bwwLTTw7n9?= =?gb2312?b?w7Sjvw==?= In-Reply-To: <1331ce590803170026y7c3e9fb1j1b3738909141ea84@mail.gmail.com> References: <1331ce590803170026y7c3e9fb1j1b3738909141ea84@mail.gmail.com> Message-ID: <47DE1E71.30301@gmail.com> cui robin wrote: > Hi,all > > 我正在使用catalyst来构建一个站点,客户端使用了yahoo的YUI,希望请求得到 > 的数据是JSON格式的。 > > 可我现在不知道如何将DBIC模块得到的数据转换成JSON格式的字串? > > DBIC的结果都是object, 大家有知道怎么转换么, 有现成的模块可以用么? 试试 Catalyst::View::JSON 这个应该是你要的。 > > > robin > ------------------------------------------------------------------------ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From uliyas at gmail.com Mon Mar 17 21:55:17 2008 From: uliyas at gmail.com (Uliyas Fan) Date: Tue, 18 Mar 2008 12:55:17 +0800 Subject: [PerlChina] =?utf-8?b?5YWz5LqOV2luMzI6Ok9EQkPnmoTpl67popg=?= Message-ID: 大家好, 有谁用过Win32::ODBC插入一个'ntext'field的吗?SQL Server 2005的环境,我在插入时总是回报错。 在DB的表里看,这是一个不可见的字符,我用ODBC查询得到的是'\x00\x00\x00\x01',可用insert插入这样的字符到DB里就会报错'[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the character string ''.' 谁能给一些指点呢。非常感谢! here is my script: ---------------------- use Win32::ODBC; use Encode; $DSN = "DSN=automation;UID=sa;PWD=********"; $conn = new Win32::ODBC($DSN); $a = "\x00\x00\x00\x01"; $sql = "insert into dcc_AgentCommand (CmdType, AgentType, CmdCreateTime, CmdContentMD5, CmdCreateOwner, CmdContent) values(64, 256, '03/16/2008 10:00:00 AM', 'NoMD5', 2, '$b')"; #insert a record!! $conn->Sql($sql); ---------------------- here is my perl version C:\Documents and Settings\Uliyas>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 33 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 819 [267479] provided by ActiveState http://www.ActiveState.com Built Aug 29 2006 12:42:41 Win32::ODBC's history HISTORY Last Modified 1999.09.25. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/74cd97ed/attachment.html From fayland at gmail.com Tue Mar 18 01:53:02 2008 From: fayland at gmail.com (Fayland Lam) Date: Tue, 18 Mar 2008 16:53:02 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for student proposals] Message-ID: <47DF82EE.3080203@gmail.com> -------- Original Message -------- Subject: [pm_groups] Summer of Perl -- call for student proposals Date: Tue, 18 Mar 2008 00:55:24 -0700 From: Eric Wilhelm To: PM Groups Hi all, Please forward this to your groups. (Also feel free to break into a discussion as to whether or how students are involved in the perl community, what we can do to connect with more universities and etc.) The Perl Foundation is participating in Google's 2008 Summer of Code(tm) and we have a lot of capable, willing mentors looking forward to working with some talented, driven students. So, we would like you to help find those students (and quickly -- the students must apply before March 24th.) This is a rare opportunity for students to get a chance to get a paid summer of hacking on exciting projects like Parrot, Perl 6, Moose, Jifty, SVK, Catalyst, or their very own Perl modules or applications. It also brings new talent into the community and gives the student a hefty "real world" experience with a knowledgable mentor. Further, employers love to see this sort of demonstration of teamwork, handling deadlines, communication skills, resourcefulness and etc. We're looking for promising students who are interested in open source (or maybe you know someone who *should* be interested in open source.) Knowledge of Perl is optional if the project is Parrot-related. The student doesn't need to be an expert in the problem domain (after all, learning is part of the process), but should bring a big pile of creativity, problem-solving skills, and determination. Students should review the page of suggested projects, but are encouraged to bring their own proposals (those are often the best.) The most important first step is getting in touch with the community and discussing their project idea with potential mentors. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects Additional information and links can be found here. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 Google has posted some flyers if you happen to have a university bulletin board or hallway handy: http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers Additional info: http://code.google.com/soc/2008/ http://code.google.com/soc/2008/faqs.html (Note that google has particular requirements to do with the fact that they are paying the students. The student must be able to show their eligibility regarding enrollment and employability.) Remember, the Perl community draws talent from many fields, so if you came to Perl from a non-computer-science major and still have contacts in that department from your university, it is probably worth mentioning to them. Thanks, Eric -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From ximiff at gmail.com Tue Mar 18 01:56:17 2008 From: ximiff at gmail.com (ximiff) Date: Tue, 18 Mar 2008 16:56:17 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for studentproposals] References: <47DF82EE.3080203@gmail.com> Message-ID: <200803181656137187939@gmail.com> is Fayland Lam the mentor of the SoP? ximiff 2008-03-18 发件人: Fayland Lam 发送时间: 2008-03-18 16:54:41 收件人: china-pm at pm.org 抄送: 主题: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for studentproposals] -------- Original Message -------- Subject: [pm_groups] Summer of Perl -- call for student proposals Date: Tue, 18 Mar 2008 00:55:24 -0700 From: Eric Wilhelm To: PM Groups Hi all, Please forward this to your groups. (Also feel free to break into a discussion as to whether or how students are involved in the perl community, what we can do to connect with more universities and etc.) The Perl Foundation is participating in Google's 2008 Summer of Code(tm) and we have a lot of capable, willing mentors looking forward to working with some talented, driven students. So, we would like you to help find those students (and quickly -- the students must apply before March 24th.) This is a rare opportunity for students to get a chance to get a paid summer of hacking on exciting projects like Parrot, Perl 6, Moose, Jifty, SVK, Catalyst, or their very own Perl modules or applications. It also brings new talent into the community and gives the student a hefty "real world" experience with a knowledgable mentor. Further, employers love to see this sort of demonstration of teamwork, handling deadlines, communication skills, resourcefulness and etc. We're looking for promising students who are interested in open source (or maybe you know someone who *should* be interested in open source.) Knowledge of Perl is optional if the project is Parrot-related. The student doesn't need to be an expert in the problem domain (after all, learning is part of the process), but should bring a big pile of creativity, problem-solving skills, and determination. Students should review the page of suggested projects, but are encouraged to bring their own proposals (those are often the best.) The most important first step is getting in touch with the community and discussing their project idea with potential mentors. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects Additional information and links can be found here. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 Google has posted some flyers if you happen to have a university bulletin board or hallway handy: http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers Additional info: http://code.google.com/soc/2008/ http://code.google.com/soc/2008/faqs.html (Note that google has particular requirements to do with the fact that they are paying the students. The student must be able to show their eligibility regarding enrollment and employability.) Remember, the Perl community draws talent from many fields, so if you came to Perl from a non-computer-science major and still have contacts in that department from your university, it is probably worth mentioning to them. Thanks, Eric -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/f648edbb/attachment-0001.html From ximiff at gmail.com Tue Mar 18 01:56:17 2008 From: ximiff at gmail.com (ximiff) Date: Tue, 18 Mar 2008 16:56:17 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for studentproposals] References: <47DF82EE.3080203@gmail.com> Message-ID: <200803181656137187939@gmail.com> is Fayland Lam the mentor of the SoP? ximiff 2008-03-18 发件人: Fayland Lam 发送时间: 2008-03-18 16:54:41 收件人: china-pm at pm.org 抄送: 主题: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for studentproposals] -------- Original Message -------- Subject: [pm_groups] Summer of Perl -- call for student proposals Date: Tue, 18 Mar 2008 00:55:24 -0700 From: Eric Wilhelm To: PM Groups Hi all, Please forward this to your groups. (Also feel free to break into a discussion as to whether or how students are involved in the perl community, what we can do to connect with more universities and etc.) The Perl Foundation is participating in Google's 2008 Summer of Code(tm) and we have a lot of capable, willing mentors looking forward to working with some talented, driven students. So, we would like you to help find those students (and quickly -- the students must apply before March 24th.) This is a rare opportunity for students to get a chance to get a paid summer of hacking on exciting projects like Parrot, Perl 6, Moose, Jifty, SVK, Catalyst, or their very own Perl modules or applications. It also brings new talent into the community and gives the student a hefty "real world" experience with a knowledgable mentor. Further, employers love to see this sort of demonstration of teamwork, handling deadlines, communication skills, resourcefulness and etc. We're looking for promising students who are interested in open source (or maybe you know someone who *should* be interested in open source.) Knowledge of Perl is optional if the project is Parrot-related. The student doesn't need to be an expert in the problem domain (after all, learning is part of the process), but should bring a big pile of creativity, problem-solving skills, and determination. Students should review the page of suggested projects, but are encouraged to bring their own proposals (those are often the best.) The most important first step is getting in touch with the community and discussing their project idea with potential mentors. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects Additional information and links can be found here. http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 Google has posted some flyers if you happen to have a university bulletin board or hallway handy: http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers Additional info: http://code.google.com/soc/2008/ http://code.google.com/soc/2008/faqs.html (Note that google has particular requirements to do with the fact that they are paying the students. The student must be able to show their eligibility regarding enrollment and employability.) Remember, the Perl community draws talent from many fields, so if you came to Perl from a non-computer-science major and still have contacts in that department from your university, it is probably worth mentioning to them. Thanks, Eric -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/f648edbb/attachment-0002.html From fayland at gmail.com Tue Mar 18 02:02:39 2008 From: fayland at gmail.com (Fayland Lam) Date: Tue, 18 Mar 2008 17:02:39 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for studentproposals] In-Reply-To: <200803181656137187939@gmail.com> References: <47DF82EE.3080203@gmail.com> <200803181656137187939@gmail.com> Message-ID: <47DF852F.3060204@gmail.com> ximiff wrote: > is Fayland Lam the mentor of the SoP? no, 不够资格。:) > ------------------------------------------------------------------------ > ximiff > 2008-03-18 > ------------------------------------------------------------------------ > *发件人:* Fayland Lam > *发送时间:* 2008-03-18 16:54:41 > *收件人:* china-pm at pm.org > *抄送:* > *主题:* [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for > studentproposals] > -------- Original Message -------- > Subject: [pm_groups] Summer of Perl -- call for student proposals > Date: Tue, 18 Mar 2008 00:55:24 -0700 > From: Eric Wilhelm > To: PM Groups > Hi all, Please forward this to your groups. (Also feel free to break > into a discussion as to whether or how students are involved in the > perl community, what we can do to connect with more universities and > etc.) > The Perl Foundation is participating in Google's 2008 Summer of Code(tm) > and we have a lot of capable, willing mentors looking forward to working > with some talented, driven students. So, we would like you to help > find those students (and quickly -- the students must apply before > March 24th.) > This is a rare opportunity for students to get a chance to get a paid > summer of hacking on exciting projects like Parrot, Perl 6, Moose, > Jifty, SVK, Catalyst, or their very own Perl modules or applications. > It also brings new talent into the community and gives the student a > hefty "real world" experience with a knowledgable mentor. Further, > employers love to see this sort of demonstration of teamwork, handling > deadlines, communication skills, resourcefulness and etc. > We're looking for promising students who are interested in open source > (or maybe you know someone who *should* be interested in open source.) > Knowledge of Perl is optional if the project is Parrot-related. The > student doesn't need to be an expert in the problem domain (after all, > learning is part of the process), but should bring a big pile of > creativity, problem-solving skills, and determination. > Students should review the page of suggested projects, but are > encouraged to bring their own proposals (those are often the best.) > The most important first step is getting in touch with the community > and discussing their project idea with potential mentors. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects > Additional information and links can be found here. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 > Google has posted some flyers if you happen to have a university > bulletin board or hallway handy: > http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers > Additional info: > http://code.google.com/soc/2008/ > http://code.google.com/soc/2008/faqs.html > (Note that google has particular requirements to do with the fact that > they are paying the students. The student must be able to show their > eligibility regarding enrollment and employability.) > Remember, the Perl community draws talent from many fields, so if you > came to Perl from a non-computer-science major and still have contacts > in that department from your university, it is probably worth > mentioning to them. > Thanks, > Eric > -- > Request pm.org Technical Support via support at pm.org > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups > -- > Fayland Lam // http://www.fayland.org/ > Foorum based on Catalyst // http://www.foorumbbs.com/ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > ------------------------------------------------------------------------ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From cuiyuming at gmail.com Tue Mar 18 02:03:52 2008 From: cuiyuming at gmail.com (cui robin) Date: Tue, 18 Mar 2008 17:03:52 +0800 Subject: [PerlChina] =?gb2312?b?udjT2kRCSXg6OkNsYXNzOjpSZXN1bHRDbGFzczo6?= =?gb2312?b?SGFzaFJlZkluZmxhdG9y0ru1487KzOI=?= Message-ID: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> HI, 我是昨天问过DBIC数据向JSON转换的家伙,在fayland的提示下,开始使用DBIC中包含的的HashRefInflator模块,将结果先转换成hash,然后再用Catalyst::View::JSON转成JSON。 可是我发现个问题,如果我用resultset的find方法,如下:DataDumper可以看出得到一个正确的Hash结果,但是如果使用search得到的结果,其中的内容还是object的,很多冗余信息。 大家有遇到这个问题么? #! /usr/bin/perl use lib './'; use CBSDB; use Data::Dumper; use DBIx::Class::ResultClass::HashRefInflator; my $dsn='dbi:mysql:dbStatus;192.168.182.5'; my $user='dbstatus'; my $pass='dbstatus'; my $schema = CBSDB->connect($dsn,$user,$pass); $schema->storage->debug(1); my $rs_base_mach = $schema->resultset('Base_mach'); $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); #$base_mach = [$rs_base_mach->search({'me.app' => 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; $base_mach=$rs_base_mach->find('172.24.68.93'); print Data::Dumper->Dumper($base_mach); robincui -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/e657590f/attachment-0001.html From ximiff at gmail.com Tue Mar 18 02:04:47 2008 From: ximiff at gmail.com (ximiff) Date: Tue, 18 Mar 2008 17:04:47 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- callfor studentproposals] References: <47DF82EE.3080203@gmail.com>, <200803181656137187939@gmail.com>, <47DF852F.3060204@gmail.com> Message-ID: <200803181704455627498@gmail.com> 我还想您能带带我呢,呵呵 ximiff 2008-03-18 发件人: Fayland Lam 发送时间: 2008-03-18 17:04:17 收件人: china-pm at pm.org 抄送: 主题: Re: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- callfor studentproposals] ximiff wrote: > is Fayland Lam the mentor of the SoP? no, 不够资格。:) > ------------------------------------------------------------------------ > ximiff > 2008-03-18 > ------------------------------------------------------------------------ > *发件人:* Fayland Lam > *发送时间:* 2008-03-18 16:54:41 > *收件人:* china-pm at pm.org > *抄送:* > *主题:* [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for > studentproposals] > -------- Original Message -------- > Subject: [pm_groups] Summer of Perl -- call for student proposals > Date: Tue, 18 Mar 2008 00:55:24 -0700 > From: Eric Wilhelm > To: PM Groups > Hi all, Please forward this to your groups. (Also feel free to break > into a discussion as to whether or how students are involved in the > perl community, what we can do to connect with more universities and > etc.) > The Perl Foundation is participating in Google's 2008 Summer of Code(tm) > and we have a lot of capable, willing mentors looking forward to working > with some talented, driven students. So, we would like you to help > find those students (and quickly -- the students must apply before > March 24th.) > This is a rare opportunity for students to get a chance to get a paid > summer of hacking on exciting projects like Parrot, Perl 6, Moose, > Jifty, SVK, Catalyst, or their very own Perl modules or applications. > It also brings new talent into the community and gives the student a > hefty "real world" experience with a knowledgable mentor. Further, > employers love to see this sort of demonstration of teamwork, handling > deadlines, communication skills, resourcefulness and etc. > We're looking for promising students who are interested in open source > (or maybe you know someone who *should* be interested in open source.) > Knowledge of Perl is optional if the project is Parrot-related. The > student doesn't need to be an expert in the problem domain (after all, > learning is part of the process), but should bring a big pile of > creativity, problem-solving skills, and determination. > Students should review the page of suggested projects, but are > encouraged to bring their own proposals (those are often the best.) > The most important first step is getting in touch with the community > and discussing their project idea with potential mentors. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects > Additional information and links can be found here. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 > Google has posted some flyers if you happen to have a university > bulletin board or hallway handy: > http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers > Additional info: > http://code.google.com/soc/2008/ > http://code.google.com/soc/2008/faqs.html > (Note that google has particular requirements to do with the fact that > they are paying the students. The student must be able to show their > eligibility regarding enrollment and employability.) > Remember, the Perl community draws talent from many fields, so if you > came to Perl from a non-computer-science major and still have contacts > in that department from your university, it is probably worth > mentioning to them. > Thanks, > Eric > -- > Request pm.org Technical Support via support at pm.org > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups > -- > Fayland Lam // http://www.fayland.org/ > Foorum based on Catalyst // http://www.foorumbbs.com/ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > ------------------------------------------------------------------------ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/892b610e/attachment.html From ximiff at gmail.com Tue Mar 18 02:04:47 2008 From: ximiff at gmail.com (ximiff) Date: Tue, 18 Mar 2008 17:04:47 +0800 Subject: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- callfor studentproposals] References: <47DF82EE.3080203@gmail.com>, <200803181656137187939@gmail.com>, <47DF852F.3060204@gmail.com> Message-ID: <200803181704455627498@gmail.com> 我还想您能带带我呢,呵呵 ximiff 2008-03-18 发件人: Fayland Lam 发送时间: 2008-03-18 17:04:17 收件人: china-pm at pm.org 抄送: 主题: Re: [PerlChina] [Fwd: [pm_groups] Summer of Perl -- callfor studentproposals] ximiff wrote: > is Fayland Lam the mentor of the SoP? no, 不够资格。:) > ------------------------------------------------------------------------ > ximiff > 2008-03-18 > ------------------------------------------------------------------------ > *发件人:* Fayland Lam > *发送时间:* 2008-03-18 16:54:41 > *收件人:* china-pm at pm.org > *抄送:* > *主题:* [PerlChina] [Fwd: [pm_groups] Summer of Perl -- call for > studentproposals] > -------- Original Message -------- > Subject: [pm_groups] Summer of Perl -- call for student proposals > Date: Tue, 18 Mar 2008 00:55:24 -0700 > From: Eric Wilhelm > To: PM Groups > Hi all, Please forward this to your groups. (Also feel free to break > into a discussion as to whether or how students are involved in the > perl community, what we can do to connect with more universities and > etc.) > The Perl Foundation is participating in Google's 2008 Summer of Code(tm) > and we have a lot of capable, willing mentors looking forward to working > with some talented, driven students. So, we would like you to help > find those students (and quickly -- the students must apply before > March 24th.) > This is a rare opportunity for students to get a chance to get a paid > summer of hacking on exciting projects like Parrot, Perl 6, Moose, > Jifty, SVK, Catalyst, or their very own Perl modules or applications. > It also brings new talent into the community and gives the student a > hefty "real world" experience with a knowledgable mentor. Further, > employers love to see this sort of demonstration of teamwork, handling > deadlines, communication skills, resourcefulness and etc. > We're looking for promising students who are interested in open source > (or maybe you know someone who *should* be interested in open source.) > Knowledge of Perl is optional if the project is Parrot-related. The > student doesn't need to be an expert in the problem domain (after all, > learning is part of the process), but should bring a big pile of > creativity, problem-solving skills, and determination. > Students should review the page of suggested projects, but are > encouraged to bring their own proposals (those are often the best.) > The most important first step is getting in touch with the community > and discussing their project idea with potential mentors. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects > Additional information and links can be found here. > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 > Google has posted some flyers if you happen to have a university > bulletin board or hallway handy: > http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers > Additional info: > http://code.google.com/soc/2008/ > http://code.google.com/soc/2008/faqs.html > (Note that google has particular requirements to do with the fact that > they are paying the students. The student must be able to show their > eligibility regarding enrollment and employability.) > Remember, the Perl community draws talent from many fields, so if you > came to Perl from a non-computer-science major and still have contacts > in that department from your university, it is probably worth > mentioning to them. > Thanks, > Eric > -- > Request pm.org Technical Support via support at pm.org > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups > -- > Fayland Lam // http://www.fayland.org/ > Foorum based on Catalyst // http://www.foorumbbs.com/ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > ------------------------------------------------------------------------ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/892b610e/attachment-0003.html From cuiyuming at gmail.com Tue Mar 18 03:06:54 2008 From: cuiyuming at gmail.com (cui robin) Date: Tue, 18 Mar 2008 18:06:54 +0800 Subject: [PerlChina] =?gb2312?b?udjT2kRCSXg6OkNsYXNzOjpSZXN1bHRDbGFzczo6?= =?gb2312?b?SGFzaFJlZkluZmxhdG9y0ru1487KzOI=?= In-Reply-To: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> References: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> Message-ID: <1331ce590803180306g284975cco259c1c4a0149b95e@mail.gmail.com> 2008/3/18 cui robin : > HI, > > 我是昨天问过DBIC数据向JSON转换的家伙,在fayland的提示下,开始使用DBIC中包含的的HashRefInflator模块,将结果先转换成hash,然后再用Catalyst::View::JSON转成JSON。 > > 可是我发现个问题,如果我用resultset的find方法,如下:DataDumper可以看出得到一个正确的Hash结果,但是如果使用search得到的结果,其中的内容还是object的,很多冗余信息。 > 大家有遇到这个问题么? > > #! /usr/bin/perl > use lib './'; > use CBSDB; > use Data::Dumper; > use DBIx::Class::ResultClass::HashRefInflator; > > my $dsn='dbi:mysql:dbStatus;192.168.182.5'; > my $user='dbstatus'; > my $pass='dbstatus'; > my $schema = CBSDB->connect($dsn,$user,$pass); > $schema->storage->debug(1); > > my $rs_base_mach = $schema->resultset('Base_mach'); > $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); > #$base_mach = [$rs_base_mach->search({'me.app' => > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; > $base_mach=$rs_base_mach->find('172.24.68.93'); > print Data::Dumper->Dumper($base_mach); > > robincui > 我尝试昨天fayland说的另外一个方法是可以的,如下: my $rs_base_mach = $schema->resultset('Base_mach'); $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); @base_mach = $rs_base_mach->search({'me.app' => 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'}); for (@base_mach) { $_ = $_->{_column_data}; } print Data::Dumper->Dumper(\@base_mach); 不明白为什么昨天fayland邮件里说如果有relationship的话会有什么问题么? 比如 @a = $c->model('X')->all; foreach (@a) { $_ = $_->{_column_data} } 这样。这样的情况是没有 relationship. 有的话,还是去查询 DBIx::Class 的 doc 好了。有个 HashRef 的 模块。 还有google别人maillist提过相同的问题在: http://lists.scsys.co.uk/pipermail/dbix-class/2008-February/005733.html DBIC那位作者,也回复了,但我每天明白他回复的意思,最后似乎他并没有接受别人提供的patch。 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/db3c55d3/attachment.html From fayland at gmail.com Tue Mar 18 04:17:24 2008 From: fayland at gmail.com (Fayland Lam) Date: Tue, 18 Mar 2008 19:17:24 +0800 Subject: [PerlChina] =?gb2312?b?udjT2kRCSXg6OkNsYXNzOjpSZXN1bHRDbGFzczo6?= =?gb2312?b?SGFzaFJlZkluZmxhdG9y0ru1487KzOI=?= In-Reply-To: <1331ce590803180306g284975cco259c1c4a0149b95e@mail.gmail.com> References: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> <1331ce590803180306g284975cco259c1c4a0149b95e@mail.gmail.com> Message-ID: <47DFA4C4.2090702@gmail.com> cui robin wrote: > 2008/3/18 cui robin >: > > HI, > 我是昨天问过DBIC数据向JSON转换的家伙,在fayland的提示下,开始使用 > DBIC中包含的的HashRefInflator模块,将结果先转换成hash,然后再用 > Catalyst::View::JSON转成JSON。 > 可是我发现个问题,如果我用resultset的find方法,如下:DataDumper可 > 以看出得到一个正确的Hash结果,但是如果使用 search得到的结果,其中 > 的内容还是object的,很多冗余信息。 > 大家有遇到这个问题么? > > #! /usr/bin/perl > use lib './'; > use CBSDB; > use Data::Dumper; > use DBIx::Class::ResultClass::HashRefInflator; > > my $dsn='dbi:mysql:dbStatus;192.168.182.5'; > my $user='dbstatus'; > my $pass='dbstatus'; > my $schema = CBSDB->connect($dsn,$user,$pass); > $schema->storage->debug(1); > > my $rs_base_mach = $schema->resultset('Base_mach'); > $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); > #$base_mach = [$rs_base_mach->search({'me.app' => > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; > $base_mach=$rs_base_mach->find('172.24.68.93 '); > print Data::Dumper->Dumper($base_mach); > > robincui > > > 我尝试昨天fayland说的另外一个方法是可以的,如下: > my $rs_base_mach = $schema->resultset('Base_mach'); > $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); > @base_mach = $rs_base_mach->search({'me.app' => > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'}); > for (@base_mach) { > $_ = $_->{_column_data}; > } > print Data::Dumper->Dumper(\@base_mach); > > 不明白为什么昨天fayland邮件里说如果有relationship的话会有什么问题么? > > 比如 @a = $c->model('X')->all; foreach (@a) { $_ = $_->{_column_data} } > 这样。这样的情况是没有 relationship. > 有的话,还是去查询 DBIx::Class 的 doc 好了。有个 HashRef 的 模块。 我的意思是,比如你的 #$base_mach = [$rs_base_mach->search({'me.app' => 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; 这里有个 join prefetch 然后用 $_ = $_->{_column_data}, 这个 join prefetch 就没了。 将 DBIC object 转为 hash 一般是用 HashRefInflator 如果行不通的话,就手工转呗。 大不了这么写 my $whatIwant = { a => $base_mach->a, b => $base_mach->b, c => $base_mach->c->real, 之类的。 > > 还有google别人maillist提过相同的问题在: > http://lists.scsys.co.uk/pipermail/dbix-class/2008-February/005733.html > DBIC那位作者,也回复了,但我每天明白他回复的意思,最后似乎他并没有接受 > 别人提供的patch。 > > > ------------------------------------------------------------------------ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From cuiyuming at gmail.com Tue Mar 18 04:42:08 2008 From: cuiyuming at gmail.com (cui robin) Date: Tue, 18 Mar 2008 19:42:08 +0800 Subject: [PerlChina] =?gb2312?b?udjT2kRCSXg6OkNsYXNzOjpSZXN1bHRDbGFzczo6?= =?gb2312?b?SGFzaFJlZkluZmxhdG9y0ru1487KzOI=?= In-Reply-To: <47DFA4C4.2090702@gmail.com> References: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> <1331ce590803180306g284975cco259c1c4a0149b95e@mail.gmail.com> <47DFA4C4.2090702@gmail.com> Message-ID: <1331ce590803180442n2155478ya409be3befe05a67@mail.gmail.com> 2008/3/18 Fayland Lam : > cui robin wrote: > > 2008/3/18 cui robin >: > > > > HI, > > 我是昨天问过DBIC数据向JSON转换的家伙,在fayland的提示下,开始使用 > > DBIC中包含的的HashRefInflator模块,将结果先转换成hash,然后再用 > > Catalyst::View::JSON转成JSON。 > > 可是我发现个问题,如果我用resultset的find方法,如下:DataDumper可 > > 以看出得到一个正确的Hash结果,但是如果使用 search得到的结果,其中 > > 的内容还是object的,很多冗余信息。 > > 大家有遇到这个问题么? > > > > #! /usr/bin/perl > > use lib './'; > > use CBSDB; > > use Data::Dumper; > > use DBIx::Class::ResultClass::HashRefInflator; > > > > my $dsn='dbi:mysql:dbStatus;192.168.182.5'; > > my $user='dbstatus'; > > my $pass='dbstatus'; > > my $schema = CBSDB->connect($dsn,$user,$pass); > > $schema->storage->debug(1); > > > > my $rs_base_mach = $schema->resultset('Base_mach'); > > > $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); > > #$base_mach = [$rs_base_mach->search({'me.app' => > > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; > > $base_mach=$rs_base_mach->find('172.24.68.93 >'); > > print Data::Dumper->Dumper($base_mach); > > > > robincui > > > > > > 我尝试昨天fayland说的另外一个方法是可以的,如下: > > my $rs_base_mach = $schema->resultset('Base_mach'); > > > $rs_base_mach->result_class('DBIx::Class::ResultClass::HashRefInflator'); > > @base_mach = $rs_base_mach->search({'me.app' => > > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'}); > > for (@base_mach) { > > $_ = $_->{_column_data}; > > } > > print Data::Dumper->Dumper(\@base_mach); > > > > 不明白为什么昨天fayland邮件里说如果有relationship的话会有什么问题么? > > > > 比如 @a = $c->model('X')->all; foreach (@a) { $_ = $_->{_column_data} } > > 这样。这样的情况是没有 relationship. > > 有的话,还是去查询 DBIx::Class 的 doc 好了。有个 HashRef 的 模块。 > > 我的意思是,比如你的 > #$base_mach = [$rs_base_mach->search({'me.app' => > 'Penguin'},{join=>'mach_group',prefetch=>'mach_group'})]; > 这里有个 join prefetch > 然后用 $_ = $_->{_column_data}, 这个 join prefetch 就没了。 > 将 DBIC object 转为 hash 一般是用 HashRefInflator > 如果行不通的话,就手工转呗。 > > 大不了这么写 > my $whatIwant = { > a => $base_mach->a, > b => $base_mach->b, > c => $base_mach->c->real, > > 之类的。 后来再仔细看明白你的意思。就是简单的引用 噢,后来仔细看那个object的dump结果才明白你的意思了,简单的_column_data确实是没有得到join表的数据。我晕死!! 另外我用了http://lists.scsys.co.uk/pipermail/dbix-class/2008-February/005733.html 给出的patch后,运行基本正常,可以得到hashref了,但是这样对于relationship返回的hashref并不是一个二维的结构体,join关系得到的列还是被嵌套了的。不爽的说! 具体如下,改了一下search: $base_mach = [$rs_base_mach->search( {'me.app' => 'Penguin','ip'=>'172.24.68.93'}, { join=>'mach_group', #prefetch=>'mach_group', columns=>[qw/me.app me.cat me.hostname me.ip mach_group.mail_to/] } )]; 得到: $VAR2 = [ { 'app' => 'Penguin', 'cat' => 'userdb', 'mach_group' => { 'mail_to' => 'robincui' }, 'ip' => '172.24.68.93', 'hostname' => 'ABCD' } ]; 折腾这么多,也许你说的对,就手工弄呗。 那个resultset的cursor方法不错。可以直接得到二维的value array。 只是又不知道如何直接得到那些select的column name? 到今天也是刚研究DBIC这个东东3,4天,老实说,不习惯,不是很爽。CDBI大家用过么,好用么? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080318/1f6e2853/attachment-0001.html From shijialee at gmail.com Tue Mar 18 18:18:01 2008 From: shijialee at gmail.com (Qiang ( James ) Li) Date: Tue, 18 Mar 2008 21:18:01 -0400 Subject: [PerlChina] =?gb2312?b?udjT2kRCSXg6OkNsYXNzOjpSZXN1bHRDbGFzczo6?= =?gb2312?b?SGFzaFJlZkluZmxhdG9y0ru1487KzOI=?= In-Reply-To: <1331ce590803180442n2155478ya409be3befe05a67@mail.gmail.com> References: <1331ce590803180203j7b201adbi5d652a3f01bff7cc@mail.gmail.com> <1331ce590803180306g284975cco259c1c4a0149b95e@mail.gmail.com> <47DFA4C4.2090702@gmail.com> <1331ce590803180442n2155478ya409be3befe05a67@mail.gmail.com> Message-ID: <47E069C9.2020100@gmail.com> cui robin wrote: > > > 到今天也是刚研究DBIC这个东东3,4天,老实说,不习惯,不是很爽。CDBI大家用 > 过么,好用么? > 两个用的都不多,只是我的小小经验. CDBI 用过一点,感觉还好, 功能没有 DBIC 多所以用起来比较简单, DBIC 有很多 功能而且很多的用户. 但我不喜欢写很多括号来实现一个 SQL. 小的 web application 我有时候用 DBIx::Simple . Qiang From zhuzhu at perlchina.org Wed Mar 19 22:51:12 2008 From: zhuzhu at perlchina.org (Zhu Zhu) Date: Thu, 20 Mar 2008 13:51:12 +0800 Subject: [PerlChina] =?utf-8?b?5YaZ5LqG5LiA5Liq57u05oqkIGFwYWNoZSBwcmVm?= =?utf-8?b?b3JrIOaooeW8j+S4i+W3peS9nOeahOiEmuacrO+8jOW4jOacm+Wkp+Wutg==?= =?utf-8?b?5aSa57uZ54K55bu66K6u?= Message-ID: <47E1FB50.502@perlchina.org> 检查APACHE是否工作以及负载,否则启动或者重新启动, 检查是否有过高CPU占用的进程,检查是否进程超过一定时间,并杀死符合条件的 进程。 #!/usr/bin/perl # zhuzhu at perlchina.org # $Id: web_check.pl 109 2008-03-18 09:36:19Z fred1982 $ # use strict; use warnings; use Proc::ProcessTable; use DBI; use Sys::Syslog; # apache pid file location my $serverIp = "125.0.0.1"; # <------------------- need set my $pidfile = "/usr/local/apache2/logs/httpd.pid"; # <-- need set my $ctlApache = "/usr/local/apache2/bin/apachectl"; # <- need set my $isRunApache = 1; my $waitApacheStartTime = 60; my $waitLoopTime = 30; my $apacheUid = 99; # <------------------- need set my $maxCpuUse = 15; my $maxRuntime = 1800; my $dbhost = '192.168.1.2'; # <------------------- need set my $dbuser = 'monitor'; my $dbpassword = 'monitor_db'; my $dbname = 'monitor'; my $procName = 'httpd'; my $minApacheProcNum = 3; # work loop block while ("true") { my $nowLoadavg = CheckLoadavg(); # check apache pid if ($nowLoadavg > 30 && $isRunApache == 1) { while (checkApacheRun() == 0){ system("$ctlApache stop"); logRecord('server', $serverIp, '0'); while("true"){ sleep(5); my $httpdNum = &checkProcNum($procName); last if($httpdNum == 0); } } $isRunApache = 0; } if ($isRunApache == 0 || checkApacheRun() == -1){ system("$ctlApache start"); logRecord('server', $serverIp, '1'); $isRunApache =1; sleep($waitApacheStartTime); } # clean bad apache processes my ($t) = new Proc::ProcessTable; my $killedProcNum = 0; foreach my $p (@{$t->table}){ if ($p->uid eq $apacheUid){ if($p->fname eq $procName && ($p->pctcpu > $maxCpuUse || (time() - $p->start) > $maxRuntime)){ $p->kill(9); $killedProcNum++; } } } if ($killedProcNum > 0) { logRecord('proc', $serverIp, $killedProcNum); } sleep($waitLoopTime); } # # functions # sub checkApacheRun { my $pid = ""; my $status = ""; if (-e $pidfile) { $pid = `/bin/cat $pidfile`; $pid =~ s/\n//g; if($pid eq "") { return -1; }else{ $status = &checkProcNum($procName, $minApacheProcNum); if ( $status < $minApacheProcNum ) { return -1; } else { return 0; } } }else{ return -1; } } sub CheckLoadavg { my @avg = split(/ /, `cat /proc/loadavg`); return $avg[0]; } sub logRecord { my ($type, $serverIp, $status) = @_; my $dbh = DBI->connect("dbi:mysql:$dbname:$dbhost",$dbuser,$dbpassword); if ($dbh){ my $runTime = checkDateTime(); if ($type eq "server") { $dbh->do(qq{INSERT INTO `web_server_status` (server_ip, status, created) VALUES ('$serverIp', '$status', 'checkDateTime()')}); } elsif ($type eq 'proc'){ $dbh->do(qq{INSERT INTO `web_proc_status` (server_ip, killed_num, created) VALUES ('$serverIp', '$status', '$runTime')}); } else { exit 0; } $dbh->disconnect(); }else{ openlog($0, 'cons,pid', 'user'); syslog('info', "Connection Error: $DBI::errstr"); closelog(); } } sub checkDateTime { my ($s, $mm, $h, $d, $m, $y) = (localtime) [0,1,2,3,4,5]; $m++; $y+=1900; if ($m<10) { $m = "0".$m; } if ($d<10) { $d = "0".$d; } if ($s<10) { $s = "0".$s; } if ($mm<10) { $mm = "0".$mm; } if ($h<10) { $h = "0".$h; } my $mysqlDateTime = "$y-$m-$d $h:$mm:$s"; return $mysqlDateTime; } sub checkProcNum { my ($procName, $status) = @_; my $tp = new Proc::ProcessTable; my $procNum = 0; foreach my $proc ( @{$tp->table} ){ if ($proc->fname eq $procName ) { $procNum++; last if ($status && $procNum > $status); } } return $procNum; } From gary.jsz at gmail.com Sat Mar 22 09:06:38 2008 From: gary.jsz at gmail.com (gary.jsz) Date: Sun, 23 Mar 2008 00:06:38 +0800 Subject: [PerlChina] =?gb2312?b?ztLU9cO0t6Kyu8HL08q8/rW9bWFpbCBsaXN0?= Message-ID: <200803230006297180803@gmail.com> 奇怪,try again 蒋士竹 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080323/2ab2939f/attachment.html From lamp.purl at gmail.com Sun Mar 23 03:15:43 2008 From: lamp.purl at gmail.com (purl lamp) Date: Sun, 23 Mar 2008 18:15:43 +0800 Subject: [PerlChina] =?gb2312?b?ztLU9cO0t6Kyu8HL08q8/rW9bWFpbCBsaXN0?= In-Reply-To: <200803230006297180803@gmail.com> References: <200803230006297180803@gmail.com> Message-ID: <367185060803230315l4673f4a7lbd3260d07085357f@mail.gmail.com> you have made it :D 在 08-3-23,gary.jsz 写道: > > > 奇怪,try again > > ________________________________ > > 蒋士竹 > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > From bruce1914 at gmail.com Sun Mar 23 06:04:33 2008 From: bruce1914 at gmail.com (bruce cheng) Date: Sun, 23 Mar 2008 21:04:33 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogIM7S1PXDtLeisrvBy9PKvP61vW1haWwg?= =?gb2312?b?bGlzdA==?= In-Reply-To: <367185060803230315l4673f4a7lbd3260d07085357f@mail.gmail.com> References: <200803230006297180803@gmail.com> <367185060803230315l4673f4a7lbd3260d07085357f@mail.gmail.com> Message-ID: <24537E3F57F344A79129FFB41FD3D188@brucelaptop> 发邮件列表自己是收不到的。 不知道能不能改进下。 > -----邮件原件----- > 发件人: china-pm-bounces+bruce1914=gmail.com at pm.org > [mailto:china-pm-bounces+bruce1914=gmail.com at pm.org] 代表 purl lamp > 发送时间: 2008年3月23日 18:16 > 收件人: china-pm at pm.org > 主题: Re: [PerlChina] 我怎么发不了邮件到mail list > > you have made it :D > > 在 08-3-23,gary.jsz 写道: > > > > > > 奇怪,try again > > > > ________________________________ > > > > 蒋士竹 > > _______________________________________________ > > China-pm mailing list > > China-pm at pm.org > > http://mail.pm.org/mailman/listinfo/china-pm > > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm From stevenzyk at gmail.com Sun Mar 23 19:33:23 2008 From: stevenzyk at gmail.com (Steven Zhu) Date: Mon, 24 Mar 2008 10:33:23 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogztLU9cO0t6Kyu8HL08q8/rW9bWFpbCBs?= =?gb2312?b?aXN0?= In-Reply-To: <24537E3F57F344A79129FFB41FD3D188@brucelaptop> References: <200803230006297180803@gmail.com> <367185060803230315l4673f4a7lbd3260d07085357f@mail.gmail.com> <24537E3F57F344A79129FFB41FD3D188@brucelaptop> Message-ID: <4f870e20803231933q4b47d3bcx9006258ffb204998@mail.gmail.com> 请教一下我这个线程有关闭掉吗?不太理解perl的多线程 我这样的话,join能够关闭线程吗? while(1) { $MySocket->recv($text,128); if($text =~ 'username') { $tempcount = 0; @threads[$tempcount]=threads->new(\&start_thread,$MySocket); $tempcount++; print "\nReceived message '", $text,"'\n"; } } foreach my $thread (@threads) { print "end\n"; $thread->join(); } sub start_thread{ 执行程序; } 在08-3-23,bruce cheng 写道: > > 发邮件列表自己是收不到的。 > > 不知道能不能改进下。 > > > -----邮件原件----- > > 发件人: china-pm-bounces+bruce1914=gmail.com at pm.org > > [mailto:china-pm-bounces+bruce1914=gmail.com at pm.org] 代表 purl lamp > > 发送时间: 2008年3月23日 18:16 > > 收件人: china-pm at pm.org > > 主题: Re: [PerlChina] 我怎么发不了邮件到mail list > > > > you have made it :D > > > > 在 08-3-23,gary.jsz 写道: > > > > > > > > > 奇怪,try again > > > > > > ________________________________ > > > > > > 蒋士竹 > > > _______________________________________________ > > > China-pm mailing list > > > China-pm at pm.org > > > http://mail.pm.org/mailman/listinfo/china-pm > > > > > _______________________________________________ > > China-pm mailing list > > China-pm at pm.org > > http://mail.pm.org/mailman/listinfo/china-pm > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm -- BR Steven.zhu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080324/0e20563f/attachment.html From fayland at gmail.com Tue Mar 25 23:39:26 2008 From: fayland at gmail.com (Fayland Lam) Date: Wed, 26 Mar 2008 14:39:26 +0800 Subject: [PerlChina] =?gb2312?b?W0Z3ZDog16q3ojogUEVSTNXQxrhd?= Message-ID: <47E9EF9E.8040707@gmail.com> -------- Original Message -------- ------------------------------------------------------------------------ *发件人:* Beckheng Lam [mailto:beckheng at gmail.com] *发送时间:* 2008年3月26日 14:32 *收件人:* 'china-pm at pm.org' *主题:* PERL招聘 Hi,各位: 现在有一个到德国的PERL工作机会.如果你或者你朋友有意向,请联系一下.谢谢各位了. 大概上是到德国工作一年.能用英文沟通,德文更好. 如果有兴趣的朋友,请联系一下.我再将你的联系方式告知相应的项目经理.具体的 事情你们再详谈. -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ From beckheng at gmail.com Tue Mar 25 23:47:33 2008 From: beckheng at gmail.com (Beckheng Lam) Date: Wed, 26 Mar 2008 14:47:33 +0800 Subject: [PerlChina] =?gb2312?b?16q3ojogdGVzdA==?= Message-ID: <47e9f199.081b600a.52d5.ffff98ca@mx.google.com> _____ 发件人: Stevens Lam [mailto:yaoheng.lin at aaahaa.com.cn] 发送时间: 2008年3月26日 14:46 收件人: 'china-pm at pm.org' 主题: test First test. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080326/eeff181c/attachment.html From beckheng at gmail.com Wed Mar 26 00:56:45 2008 From: beckheng at gmail.com (Beckheng Lam) Date: Wed, 26 Mar 2008 15:56:45 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogIFtGd2Q6INeqt6I6IFBFUkzV0Ma4XQ==?= In-Reply-To: <47E9EF9E.8040707@gmail.com> Message-ID: <47ea01c7.0b97600a.03b6.ffff8722@mx.google.com> HI,再加上一个,是在广州的PERL工作,职位是负责香港一间公司的系统维护和开发. 招聘公司跟先前的是同一个. -----邮件原件----- 发件人: china-pm-bounces+beckheng=gmail.com at pm.org [mailto:china-pm-bounces+beckheng=gmail.com at pm.org] 代表 Fayland Lam 发送时间: 2008年3月26日 14:39 收件人: chin >> "china-pm at pm.org" 主题: [PerlChina] [Fwd: 转发: PERL招聘] -------- Original Message -------- ------------------------------------------------------------------------ *发件人:* Beckheng Lam [mailto:beckheng at gmail.com] *发送时间:* 2008年3月26日 14:32 *收件人:* 'china-pm at pm.org' *主题:* PERL招聘 Hi,各位: 现在有一个到德国的PERL工作机会.如果你或者你朋友有意向,请联系一下.谢谢各位了. 大概上是到德国工作一年.能用英文沟通,德文更好. 如果有兴趣的朋友,请联系一下.我再将你的联系方式告知相应的项目经理.具体的 事情你们再详谈. -- Fayland Lam // http://www.fayland.org/ Foorum based on Catalyst // http://www.foorumbbs.com/ _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm From warhua at gmail.com Wed Mar 26 03:22:11 2008 From: warhua at gmail.com (war hua) Date: Wed, 26 Mar 2008 18:22:11 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogW0Z3ZDog16q3ojogUEVSTNXQxrhd?= In-Reply-To: <47ea01c7.0b97600a.03b6.ffff8722@mx.google.com> References: <47E9EF9E.8040707@gmail.com> <47ea01c7.0b97600a.03b6.ffff8722@mx.google.com> Message-ID: <8fecffd0803260322j3654ebc2ob6b7c2bfa2e1dd40@mail.gmail.com> 请问有什么要求?工作经验啥?呵呵 在 08-3-26,Beckheng Lam 写道: > HI,再加上一个,是在广州的PERL工作,职位是负责香港一间公司的系统维护和开发. > 招聘公司跟先前的是同一个. > > -----邮件原件----- > 发件人: china-pm-bounces+beckheng=gmail.com at pm.org > [mailto:china-pm-bounces+beckheng=gmail.com at pm.org] 代表 Fayland Lam > 发送时间: 2008年3月26日 14:39 > 收件人: chin >> "china-pm at pm.org" > 主题: [PerlChina] [Fwd: 转发: PERL招聘] > > > > > -------- Original Message -------- > > ------------------------------------------------------------------------ > > *发件人:* Beckheng Lam [mailto:beckheng at gmail.com] > *发送时间:* 2008年3月26日 14:32 > *收件人:* 'china-pm at pm.org' > *主题:* PERL招聘 > > Hi,各位: > > 现在有一个到德国的PERL工作机会.如果你或者你朋友有意向,请联系一下.谢谢各位了. > > 大概上是到德国工作一年.能用英文沟通,德文更好. > > 如果有兴趣的朋友,请联系一下.我再将你的联系方式告知相应的项目经理.具体的 > 事情你们再详谈. > > > -- > Fayland Lam // http://www.fayland.org/ > Foorum based on Catalyst // http://www.foorumbbs.com/ > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm From lamp.purl at gmail.com Wed Mar 26 06:33:53 2008 From: lamp.purl at gmail.com (purl lamp) Date: Wed, 26 Mar 2008 21:33:53 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogztLU9cO0t6Kyu8HL08q8/rW9bWFpbCBs?= =?gb2312?b?aXN0?= In-Reply-To: <4f870e20803231933q4b47d3bcx9006258ffb204998@mail.gmail.com> References: <200803230006297180803@gmail.com> <367185060803230315l4673f4a7lbd3260d07085357f@mail.gmail.com> <24537E3F57F344A79129FFB41FD3D188@brucelaptop> <4f870e20803231933q4b47d3bcx9006258ffb204998@mail.gmail.com> Message-ID: <367185060803260633x34f670eeu88e5f9bd9ea851c9@mail.gmail.com> detach 子线程就可以了,不需要 join 除非有什么特别的要清理。而且 join 会导致主线程卡住。 在 08-3-24,Steven Zhu 写道: > 请教一下我这个线程有关闭掉吗?不太理解perl的多线程 > 我这样的话,join能够关闭线程吗? > > > > while(1) > { > $MySocket->recv($text,128); > if($text =~ 'username') > { > $tempcount = 0; > > @threads[$tempcount]=threads->new(\&start_thread,$MySocket); > $tempcount++; > print "\nReceived message '", $text,"'\n"; > } > } > > foreach my $thread (@threads) { > print "end\n"; > $thread->join(); > } > sub start_thread{ > 执行程序; > } > > > > 在08-3-23,bruce cheng 写道: > > > 发邮件列表自己是收不到的。 > > > > 不知道能不能改进下。 > > > > > -----邮件原件----- > > > 发件人: china-pm-bounces+bruce1914=gmail.com at pm.org > > > [mailto:china-pm-bounces+bruce1914=gmail.com at pm.org] 代表 > purl lamp > > > 发送时间: 2008年3月23日 18:16 > > > 收件人: china-pm at pm.org > > > 主题: Re: [PerlChina] 我怎么发不了邮件到mail list > > > > > > you have made it :D > > > > > > 在 08-3-23,gary.jsz 写道: > > > > > > > > > > > > 奇怪,try again > > > > > > > > ________________________________ > > > > > > > > 蒋士竹 > > > > _______________________________________________ > > > > China-pm mailing list > > > > China-pm at pm.org > > > > http://mail.pm.org/mailman/listinfo/china-pm > > > > > > > _______________________________________________ > > > China-pm mailing list > > > China-pm at pm.org > > > http://mail.pm.org/mailman/listinfo/china-pm > > > > _______________________________________________ > > China-pm mailing list > > China-pm at pm.org > > http://mail.pm.org/mailman/listinfo/china-pm > > > > -- > BR > Steven.zhu > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm > From lxmxn520 at gmail.com Wed Mar 26 08:31:33 2008 From: lxmxn520 at gmail.com (lxmxn) Date: Wed, 26 Mar 2008 23:31:33 +0800 Subject: [PerlChina] =?gb2312?b?tPC4tDogW0Z3ZDog16q3ojogUEVSTNXQxrhd?= In-Reply-To: <8fecffd0803260322j3654ebc2ob6b7c2bfa2e1dd40@mail.gmail.com> References: <47E9EF9E.8040707@gmail.com> <47ea01c7.0b97600a.03b6.ffff8722@mx.google.com> <8fecffd0803260322j3654ebc2ob6b7c2bfa2e1dd40@mail.gmail.com> Message-ID: <7a5835ad0803260831y185faf11oec1150e8be3e41b@mail.gmail.com> 是啊,把招聘的要求说说,还有联系电话、邮箱什么的。 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/china-pm/attachments/20080326/b84a3301/attachment.html From shijialee at gmail.com Fri Mar 28 12:27:42 2008 From: shijialee at gmail.com (Qiang (James) Li) Date: Fri, 28 Mar 2008 15:27:42 -0400 Subject: [PerlChina] visiting china Message-ID: <4ab5ddef0803281227td22f36exd13e9ef9a5ccfdf6@mail.gmail.com> hi all, i am going to stay in china for few months and mainly be in beijing, maybe shanghai.. would like to meet some of you in real person after so many year :) drop me a line privately with your phone number and i will try to reach you when i get there. Qiang From cnhacktnt at gmail.com Fri Mar 28 19:00:51 2008 From: cnhacktnt at gmail.com (cnhacktnt) Date: Sat, 29 Mar 2008 10:00:51 +0800 Subject: [PerlChina] visiting china In-Reply-To: <4ab5ddef0803281227td22f36exd13e9ef9a5ccfdf6@mail.gmail.com> References: <4ab5ddef0803281227td22f36exd13e9ef9a5ccfdf6@mail.gmail.com> Message-ID: <47EDA2D3.2010006@gmail.com> hi Qiang, Welcome back to China, I am in Shanghai, my cellphone: +86 1 3 5 6 4 2 0 8 2 0 0 Qiang (James) Li wrote: > hi all, > > i am going to stay in china for few months and mainly be in beijing, > maybe shanghai.. would like to meet some of you in real person after > so many year :) > > drop me a line privately with your phone number and i will try to > reach you when i get there. > > Qiang > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm From lamp.purl at gmail.com Mon Mar 31 00:10:53 2008 From: lamp.purl at gmail.com (purl lamp) Date: Mon, 31 Mar 2008 15:10:53 +0800 Subject: [PerlChina] visiting china In-Reply-To: <47EDA2D3.2010006@gmail.com> References: <4ab5ddef0803281227td22f36exd13e9ef9a5ccfdf6@mail.gmail.com> <47EDA2D3.2010006@gmail.com> Message-ID: <367185060803310010v2ef356fex734783ac8f4edb73@mail.gmail.com> welcome to visit us at shanghai, we have a lot of thing to share and some plan to discuss. maybe that will also kick start some interesting relationship between perl learners here. which make practical language really able to learn. 2008/3/29, cnhacktnt : > hi Qiang, > > Welcome back to China, I am in Shanghai, my cellphone: +86 1 3 5 6 4 2 0 > 8 2 0 0 > > > > > Qiang (James) Li wrote: > > hi all, > > > > i am going to stay in china for few months and mainly be in beijing, > > maybe shanghai.. would like to meet some of you in real person after > > so many year :) > > > > drop me a line privately with your phone number and i will try to > > reach you when i get there. > > > > Qiang > > _______________________________________________ > > China-pm mailing list > > China-pm at pm.org > > http://mail.pm.org/mailman/listinfo/china-pm > > _______________________________________________ > China-pm mailing list > China-pm at pm.org > http://mail.pm.org/mailman/listinfo/china-pm