Re: Reducing rsync cost
On 22/11/2010 15:18, David Nicol wrote: On Mon, Nov 22, 2010 at 4:37 AM, David Landgrenda...@landgren.net wrote: Yeah, this is the killer. In an ideal world, we would kill the symlinks such as authors/id/*, modules/by-category/*, modules/by-module/* and so on. These could be recreated via shell scripts locally on mirrors for people who wish to maintain these legacies. Cutting that out would diminish the rsync burden considerably. David or re-engineer CPAN as a sqlite+FTSE database, and re-engineer the mirroring process as a database mirror via a TBD compact database diff protocol (I have no intention of doing any of this myself; good morning) Well... I guess that's not going to happen then, is it? I shouldn't even bother replying, but I wouldn't want the archives to think that silence indicates tacit agreement. David
Reducing rsync cost (was: Re: Using a better compression than .gz for one's CPAN modules)
On 19/11/2010 20:57, dhu...@hudes.org wrote: source code, even 100KLOC? Once you go to .gz you're already at better than 2:1. What are you going to save by going to even 3:1, 10Kbytes? compared to the nuisance inflicted, it's nothing. Over the entire CPAN archive, it'd be significant... I agree on the individual case it's probably not worth worrying about too much. But if it's easy to use .bz2 or something better it wouldn't hurt to get that word out. (And it may be worth making it easy, though I'm not sure about that.) Daniel T. Staal Disk space is cheap. Bandwidth is cheap. What's rough is the rsync between mirrors. Compressing to .bz2 won't help that: the stress is doing a stat on every single file in CPAN not the transfer. Work toward optimizing the mirror distribution instead of worrying about bz2 vs gz. Remember not Yeah, this is the killer. In an ideal world, we would kill the symlinks such as authors/id/*, modules/by-category/*, modules/by-module/* and so on. These could be recreated via shell scripts locally on mirrors for people who wish to maintain these legacies. Cutting that out would diminish the rsync burden considerably. David -- There's bum trash in my hall and my place is ripped I've totaled another amp, I'm calling in sick
Re: Trimming the CPAN
On 25/03/2010 09:12, nadim khemir wrote: I'd agree with Jonas, the only way is to ask authors to clean their own home. from very official to non official: - mail all authors (that would also list all those with broken mail addresses) - something on perl.org - ask Perl monger groups to take the subject up - quick presentation at conferences - Perlbuzz entry - any/all of the Perl news site that end up in the many aggregators - ... - whine on IRC - offer a Perl T-shirt with 'YES! I removed all the modules that were more than 5 years old on my CPAN.' to all those that do some cleaning (prepare to heavily invest in a small factory for this one) I'm not sure all authors know where to find all their modules listed and how to send them to backpan. I look into my PAUSE account, there are certainly more ways. There is no sending to the backpan, it is automatic. A backpan mirror is nothing more than a regular mirror for which no deletion occurs upon upstream removal. Having CPAN search engines displaying a different background color when there is too much trash around may make authors aware that something should be done. Remember, even for slow-moving modules, you should always keep version n-1 around, so that people can use the diff tools on search.cpan.org to compare differences. For fast-moving modules, there's nothing wrong with keeping a year's worth of versions on-line. If your modules are packaged as part of OS distributions (FreeBSD, the various Linux flavours, Strawberry), you have to ensure that their reference version remains available from your directory. David -- naked, but wearing blinding lights! were it a pretty girl, she'd be surrounded as a flame by moths
Re: Weekend entertainment
David Cantrell wrote, some time around 17/11/2009 13:12: On Sun, Nov 15, 2009 at 12:51:44PM +0100, David Landgren wrote: (I shall compose a message saying Acme is fun, etc. etc. Can anyone point me to other similar Acme modules to put this in context?) Surely it would be better to just reply ... Would you be happy if such an attack is lunched against your own country, your mother land! Yes. Mmm. Food. In the end I decided to let it slide. Since the author has been contacted nothing much else needs to be done. David -- it's an anthem in a vacuum on a hyperstation, day dreaming days in a daydream nation
Weekend entertainment
I wanted to share this... Some people have no sense of humour. This came up on the cont...@perl.org queue. (I shall compose a message saying Acme is fun, etc. etc. Can anyone point me to other similar Acme modules to put this in context?) Dear Sir, Let me begin by saying that I am really disappointed at your postings on CPAN most especially the Acme::Lingua::NIGERIAN module. Such an educative site, the CPAN should not be used as a launchpad for attacking a nation and its people. Nigeria has been and will ever be a great nation and its people are good. It is very unfair to judge a nation of over 144.7 million people (World Bank, 2006) by the action of few! Would you be happy if such an attack is lunched against your own country, your mother land! Nigeria is my mother and father land, I love my country just as you do love yours. You should channel your energy at something positive, something that would make your own country better and the humanity at large rather than attacking other nations and their people. I personally as a Nigerian demand an apology from you for embarrassing me and my country. Your apology should also be posted on CPAN and any other place you might have posted the module. /forward David -- it's an anthem in a vacuum on a hyperstation, day dreaming days in a daydream nation
Re: Looking for C header files in all the right places
Norbert Gruener wrote, some time around 14/08/2008 08:57: Hi David, On Sat, Mar 22 2008, David Landgren wrote: Authors, I have a problem with Crypt::SSLeay getting the path right to custom include directories to pick up the OpenSSL libraries and headers. did you get ever a solution to your problem? I have a similar problem and I would need a solution too. Nope, the message sank without a trace :) I too would like a robust solution, if anyone knows of one. I can repost the original question if it has been expired from people's mailboxes. David -- stubborn tiny lights vs. clustering darkness forever ok?
Re: CPAN maintainer e-mail address defunct
David Fleck a écrit : I'm trying to contact Colin Kuskie, maintainer of the Statistics::Descriptive module, but mail to his cpan address bounces: |The following addresses had delivery problems: | |[EMAIL PROTECTED] There are some tickets in RT that were filed by lhs=ckuskie rhs=sterlink.net last year. Give that a try. David
Re: How to challenge a cpan-testers test result?
Eric Roode wrote: [meta: I apologize in advance if this is a FAQ, but I could not get to mail-archive.com to search the group's archive] Can one challenge the result of a CPAN-testers test result? If so, how? No. I see several erroneous FAIL reports for modules of mine, and I think it's unfair that it appears as though my module(s) have failures or outstanding bugs. I wouldn't worry about the apparent unfairness of it. People who care enough to look at the eventual errors reported against a module are sufficiently intelligent to determine whether or not the error applies to them. I have a couple of FreeBSD-specific modules. Automated smokers running on Linux and what ever keep trying to test them and fail. I don't think these failures will stop someone who uses FreeBSD from considering them for their own use. Here's an example: report 1522795, http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1522795.html About 2/3 of the way down in the report, there are the following lines: [MSG] [Mon May 26 01:20:29 2008] Ok, not sending test report [ERROR] [Mon May 26 01:20:32 2008] MAKE failed: cp lib/Regexp/Common/time.pm blib/lib/Regexp/Common/time.pm Manifying blib/man3/Regexp::Common::time.3 /home/cpan/perl562/bin/perl -Iblib/arch -Iblib/lib Build.PL Build Too early to specify a build action 'Build'. Do 'Build Build' instead. gmake: *** [Build] Error 2 On the first line above, we see that the tester is not sending a test report to the author (me). Why? On the fourth line above, we see Because if there's one thing that makes an author even more irate that finding out that their module failed on someone else's setup, it's having their nose rubbed in the fact and having their inbox spammed. We stopped doing that a long time ago. that the tester's script is incorrectly invoking Build.PL. Why? So far as I can tell, I have no way of contacting the tester who generated this report. The top of the report simply says: From: chris Date: May 25, 2008 17:20 Subject: FAIL Regexp-Common-time-0.03 i386-netbsd-thread-multi-64int 3.1 Who is chris, and how do I contact him or her? Taking a guess based on statistical probabilities, I would say that this would be Chris Kidney Bingos Williams. Here's another example: test report 1522754, http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1522754.html /Volumes/Media/smoke/perl562/bin/perl -Iblib/arch -Iblib/lib Build.PL Build Can't locate Module/Build.pm in @INC (@INC contains: [deleted by eric]) at Build.PL line 3. BEGIN failed--compilation aborted at Build.PL line 3. make: *** [Build] Error 2 MISSING PREREQUISITES: It was observed that the test suite seem to fail without these modules: Module::Build As such, adding the prerequisite module(s) to 'PREREQ_PM' in your Makefile.PL should solve this problem. For example: The test suite not only incorrectly invoked Build.PL, it failed because Module::Build is not installed, and then helpfully tells me how to update Makefile.PL so as to avoid the problem! How ridiculous! (My modules include both Build.PL and Makefile.PL, so users can have a choice about how to install). The sad thing is that these erroneous test results make it appear as though my module has unresolved problems. I've been searching the web for the past hour or two, and I can find no information about how to contest a cpan-testers result, or to get an erroneous FAIL result removed from my module's record. Relax, no-one will think any less of your modules simply because they acquire a couple of FAIL reports. The more complex a module is, the more likely it is to fail somewhere. There is a long-standing discussion over whether or not Module::Build is a viable installation technique, due to the bootstrapping problem of requiring Module::Build to be installed in the first place before installing your own module. The question is whether a vanilla out-of-the-box 5.8.8 installation can install your module without any toolchain component needing to be installed beforehand. Now that Module::Build is bundled with 5.10, we may hope that the problems surrounding this issue will begin to subside. If you heed the advice given in the other replies, you should be able to improve the successful testing of your module. In that case, you just have to release a new version! Can anyone help? Thanks, Eric Roode Regards, David -- stubborn tiny lights vs. clustering darkness forever ok?
Re: license in META.yml
David Precious wrote: David Landgren wrote: Gabor Szabo wrote: As I am usually using Module::Build I did not know that a recent version of MakeMaker has started to support the LICENSE parameter and will include it in the automatically created META.yml. That has been the case for a couple of years or so. I think it was first introduced in 6.30. Yup, back in 2005. However, using the LICENSE parameter will cause the build to break on any system with EU::MM 6.30 installed. (Granted, they should upgrade - but I'd rather avoid unnecessary breakage). That's not true. Older EU::MMs will spit a warning, but they'll build the Makefile just the same. FWIW, my works anywhere snippet looks like this: my @license = do { my $version = $ExtUtils::MakeMaker::VERSION; $version =~ tr/_//d; $version} 6.30 ? qw(LICENSE perl) : (); WriteMakefile( AUTHOR= 'David Landgren', # ... @license, ); David
Re: license in META.yml
Gabor Szabo wrote: As I am usually using Module::Build I did not know that a recent version of MakeMaker has started to support the LICENSE parameter and will include it in the automatically created META.yml. That has been the case for a couple of years or so. I think it was first introduced in 6.30. David
Re: Config::IniFiles - Resuming Maintenance
Shlomi Fish wrote: Hi all! It seems that Config::IniFiles has not been maintained for over 4 years now: http://search.cpan.org/dist/Config-IniFiles/ Have you tried dropping a line in the contact box at http://sevensimplemachines.com/contact.aspx ? David
Re: [Request] File::Wordlist
Chris Dolan wrote: Dear really-really-lazyweb, Would someone please create a CPAN module that finds a wordlist on the local computer in a cross-platform friendly manner, a la File::HomeDir? For typical unix systems, that would be: sub find_wordlist { return '/usr/share/dict/words'; } But it could be smarter and look for, say, /usr/share/dict/scrabble-english first. For Windows, maybe it would look for MS Office or OpenOffice files first. Lucky I wasn't drinking anything when I read this part, otherwise I would have snorted stuff all over the keyboard. Like, as if an MS Office dictionary is going to be remotely parseable by anything outside itself. Oh, and you forgot Lotus Notes .dic files :) David
Re: lambda - a shortcut for sub {...}
Eric Wilhelm wrote: The great thing about maintenance programmers is that they come from the future (the one where utf8 just works.) Wow. Which parallel future do you come from ? :)
Re: Contacting JOEYATES and GMPASSOS
Mattia Barbon wrote: Hello everybody, I'd like to contact Joe Yates (JOEYATES) and Graciliano Monteiro Passos (GMPASSOS), the former for OpenOffice::UNO module, the gmpassos rang a bell. http://www.perlmonks.org/index.pl?node=gmpassos Hasn't been there in two years...
Re: in search of author: ABW, App::Config
Ricardo SIGNES wrote: I'd like to get App::Config indexed, but ABW has module-list registered App::Config but does not use it. I've sent him an email with no reply (only about a week ago). Does anyone have a lead on a better way to get in touch with him than the address listed on his CPAN account? Not wanting to make it any easier on spammers, try this: use Acme::DonMartin; sittzle poong yukkle krakkle skrazatz ferrip tear din gahoff rrip blut puffa shklizzortch sputz clink flork pittooie kashpritza kik phoon shlikle sound skroinch gishklurk fwizzish gashplutzga floon spukkonk thloop shlurk gigazing froom gasploosh gaplonk fluk shkloort onghk furshglurk bloof twong glit foomp sound ploobadoof gazap skreech
Re: Please let me have co-maintainership of XML-SemanticDiff
Shlomi Fish wrote: Hello CPAN Cabalists! There is no cabal. Since I last talked to you about XML-SemanticDiff (on 10 June - http://www.nntp.perl.org/group/perl.modules/2007/06/msg54811.html ), I've continued working on my own fork of it here: http://svn.berlios.de/svnroot/repos/web-cpan/XML-SemanticDiff/trunk/ It now fixes all the bugs here: http://rt.cpan.org/Dist/Display.html?Queue=XML-SemanticDiff Well done! [...] So I ask the CPAN cabalists for me to become a co-maintainer of the module, so I can: 1. Upload my modified version to the CPAN. 2. Close the bugs for it on rt.cpan.org. 3. Perhaps enhance or correct it further into the future. And by that fix XML-SemanticDiff which is important and heavily needs an update. That's for sure. My only question concerns the license. I see that the previous version was licensed under the same terms as Perl itself. Will you continue to do as well, or do you plan to change it to your UCLA license? Regards, David Landgren
Re: Please let me have co-maintainership of XML-SemanticDiff
Shlomi Fish wrote: On Wednesday 04 July 2007, David Landgren wrote: Shlomi Fish wrote: Hello CPAN Cabalists! There is no cabal. Correction: there is no IGLU Cabal! ;-) http://www.hackers.org.il/mediawiki/index.php/The_mysterious_IGLU_Cabal http://www.shlomifish.org/humour/fortunes/tinic Seriously now - how am I supposed to call the core CPAN administrators? I once referred to them as the CPAN gods but was told that it's inappropriate. Now I'm told that CPAN Cabalists is also wrong. Is CPAN admins good enough? Heh, it was a joke. The Cabal is pleased. Since I last talked to you about XML-SemanticDiff (on 10 June - http://www.nntp.perl.org/group/perl.modules/2007/06/msg54811.html ), I've continued working on my own fork of it here: http://svn.berlios.de/svnroot/repos/web-cpan/XML-SemanticDiff/trunk/ It now fixes all the bugs here: http://rt.cpan.org/Dist/Display.html?Queue=XML-SemanticDiff Well done! [...] Thanks. So I ask the CPAN cabalists for me to become a co-maintainer of the module, so I can: 1. Upload my modified version to the CPAN. 2. Close the bugs for it on rt.cpan.org. 3. Perhaps enhance or correct it further into the future. And by that fix XML-SemanticDiff which is important and heavily needs an update. That's for sure. My only question concerns the license. I see that the previous version was licensed under the same terms as Perl itself. Will you continue to do as well, or do you plan to change it to your UCLA license? Well, I'm not familiar with a licence called the UCLA licence. I'm normally using the MIT/X11 Licence (sometimes referred to as the MIT Licence). I assume that's what you meant. Ah yes, that's the one. Sorry. I have no plans of switching the distribution to the MIT/X11 licence. If I'm planning on using the original code, I am not allowed to do so, because the originator of the code licensed them under the GPL and (original) Artistic licences. Both of these licences are recursive, and do not allow relicensing under a different licence in a derived work. The only way to do it, is to rewrite the code under a different licence. What I am doing is disclaiming any implicit or explicit ownership on my modifications, and am assigning the full rights of them to the originator. Thus, if he ever resurfaces, he could re-licence the most up-to-date code without a need for my approval. Well that all seems hunky dory. As far as I can see, you should be made co-maint right away. Not that I have any sway. Gods, are you listening? David Landgren
[RFC] new, improved File::Path
A few weeks ago, someone filed a patch on p5p to allow a new positional parameter to File::Path::rmtree() that would delete everything, but retain the root directory. Which is quite a desirable feature. Michael G Schwern shot the implementation down, saying (what we all know) that positional parameters suck. Quick, what would: rmtree( ['foo', 'bar', 'rat'], 0, undef, 1 ); do? As it turns out, at the same time I was playing around with the code, seeing if a modern interface (use a hashref as a way of communicating arbitrary control parameters) would work, and retain backwards compatibility. So now the above could be written as: rmtree( {verbose = 0, keep_root = 1}, 'foo', 'bar', 'rat' ); And I wound up as co-maintainer of the module. I've added a slew of tests to improve the code coverage and restored 5.005 compatibility (it wasn't hard). It also allows errors to be trapped without having to resort to eval. The rendered POD is here http://www.landgren.net/perl/File-Path.html and the code, should you care, is here: http://svnweb.mongueurs.net/File-Path/view/trunk/Path.pm?lang=en Comments, criticisms and suggestions welcome. Thanks, David
[Fwd: [perl #42507] funet.fi down for maint]
I CC'ed module-authors on a reply to this from the ticket, but in case that doesn't get through, here's the skinny on funet.fi later on today. So no need to worry if it looks like your beloved upload is taking time to propagate, it is to be expected. Thanks, David ---BeginMessage--- URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42507 Monday, 2007-04-16, funet.fi will be down from 12:00 to about 16:00 GMT for hardware maintenance. (More and faster disk, yeah!) ---End Message---
[perl #42507] funet.fi down for maint
On Sat Apr 14 05:33:05 2007, jhi wrote: Monday, 2007-04-16, funet.fi will be down from 12:00 to about 16:00 GMT for hardware maintenance. (More and faster disk, yeah!) Uploads will be frozen for a little while today (accepted, but not propagated). This came up on the main perl.org contact address. I don't think it worth making more widely known (e.g. on use.perl), and this list probably has the largest proportion of people who might be interested, and likely the list people would turn to if they noticed funet.fi was unavailable. David
Best practices for dual-lifing a core module?
List, I've recently taken over File::Path, to bring some modern goodness to this venerable module (and therefore allow such goodness to be backported to older perls). As it stands in the core, it consists of the files ./lib/File/Path.{pm,t}. To turn it into a standalone CPAN distribution, it needs a manifest, a README, pod tests (*snort*), a Makefile.PL, test files in t/ and so forth. Which is fair enough, but I wonder how I sync it back with blead. Do I just make sure that I can pull the .t file and the .pm file, wherever they may wind up in the distribution layout, and diff them against those two files in blead? I can't see the point of stuffing all the ancillary distribution files into the blead tarball when the .pm and .t will be enough. What do other people do/have other people done? Looking for clues, David
Re: [OT] recovering an SVN repo with SVK
Philippe Bruhat (BooK) wrote: Le dimanche 11 février 2007 à 18:06, David Landgren écrivait: [...] and I suspect that will cause indigestion later on. Rather than fiddle around with calculating content lengths myself, or try and drop the entire stanza since there's nothing left, it looks like SVN::Dump will have me writing much less make-work code. Yes, recent versions of SVN::Dump will do all the calculations for you. If there is a new functionnality you need, or patches you want to add, just let me know. You're lucky that the SVN::Dump repository was among the ones you trashed... ;-) I like to inflict pain upon myself before spreading the love. Hmm, I'll try an upgrade then. Last night it was choking on svk-isms or something. Something that would save me from having to spool the output of the svnadmin dump command to a temp file would be to admit the possibility of feeding a glob to new() and getting it to read the contents of a filehandle (which would be me piping stuff in from svnadmin dump, c.f. Nik Clayton's recipe on the subject). Thanks, David
Re: [OT] recovering an SVN repo with SVK
Nik Clayton wrote: [...] I finally managed to work on this problem a bit this weekend. Finally, the repo dump will also contain some svm:* properties. These should probably be removed too, for completeness sake. A property definition in the dump file looks like: K \d+ propname V \d+ propval E.g., K 10 svn:author V 3 nik Keyword/value pairs, with the trailing digits indicating the string length, not including the terminating '\n'. Again, you'll need to write a filter that can strip these out. Turns out you can't do this in straight Perl. If you, you wind up with stanzas that look like Prop-content-length: 98 Content-length: 98 PROPS-END and I suspect that will cause indigestion later on. Rather than fiddle around with calculating content lengths myself, or try and drop the entire stanza since there's nothing left, it looks like SVN::Dump will have me writing much less make-work code. Later, David
Re: Delete hate speech module
Joshua ben Jore wrote: I'd just read of Time::Cube, a disjointed rant full of hate speech. This is the kind of content that is most deserving of deletion from CPAN. Would the responsible parties please go nuke this, please? Ok, lot of valid arguments that I agree with more or less, so I'm going to play devil's advocate. CPAN has worked as well as it is, and people are prompt to repeat it, because people are allowed to upload anything to it. In that light, it's remarkable that incidents such as this remain few and far between. I recommed against deleting it, because that only add fuel to the fire. The crackpot who uploaded this drivel in the first place will be able to crow freedom of speech and it's all a communist plot, there really is a perl cabal and they're out to get me and blah blah blah. And as we all know, 99% of modules these days are found through searches. I would recommend a much more subtle approach: ask Andreas and Randy to... oops... accidentally remove it from their indices, and therefore when people search for Time::, it won't show up. It will still be there. We wouldn't have to admit to forcibly removing anything from the archive, it would just be... hard to stumble across. Individuals who run their own archive mirrors may wish to (and indeed may be required to, in terms on national laws (the French have something called incitation à la haine raciale (haine means hate, I'm sure you can figure the rest out))) institute their own policies as to what they wish to mirror from the funet master. I would also recommend writing your (*) opinion about the module by means of reviews on cpanratings, as well as annocpan and cpan::forum. That way a third party will understand that the module is not condoned by the general Perl community. David * you plural, I'm not just talking about Joshua
Re: Delete hate speech module
Andy Armstrong wrote: On 8 Feb 2007, at 17:20, David Landgren wrote: And as we all know, 99% of modules these days are found through searches. I would recommend a much more subtle approach: ask Andreas and Randy to... oops... accidentally remove it from their indices, and therefore when people search for Time::, it won't show up. Of course the person who uploaded it may subscribe to this list or have found the public archives. True, but by the same token they've already read the rest of the thread, so that's beside the point. Or else I'm missing your point. David
Re: Delete hate speech module
Randy Kobes wrote: [...] Perhaps, if nothing else, the terms of usage of the package: http://search.cpan.org/src/BANTOWN/Time-Cubic-1.0/LICENSE by which one *must* commit at least three violations of the named parts of the US Criminal Code to use it, makes it unsuitable for CPAN. Continuing as the devil's advocate, I still can't decide if that's just a parody on the whole license issue. It's just too over the top. That said, I agree that CPAN doesn't have to be the vector for distributing this useless drivel. While the license gave me a big laugh, the comments in the source code are distinctly unfunny. David
Re: [OT] recovering an SVN repo with SVK
Nik Clayton wrote: David Landgren wrote: Parallel to that, I look after the mongueurs.net svnweb repositories, and I've been trying to track down a memory leak with Nik Clayton. Alas, at some point I ran some tests of his against a couple of live repos, which emptied them out and filled them with test info. This was about the time that I starting pondering the fact that I should dump the repos regularly and move the backups off-site. So, I have a couple of trashed repos, but I do have mirrors of both in SVK repositories on my laptop. Is there a recipe that will let me restore the contents of the SVN repo from my mirror? I don't really care if the log messages are recorded as coming from SVK merges rather than SVN itself, I just want the revision history. Ah. Oops. I was wondering why I hadn't heard from you :-) heh! Not to worry. At least I chose my own repos as guinea pigs. [Lots of useful stuff snipped] Hope that helps -- FWIW, if you develop a tool that can, given an SVK mirrored repo, regenerate the original repo, that would be a valuable addition to CPAN. N All that actually makes sense. Thank-you for taking the time to pen such a thoughtful reply. I shall see what I can do. Thanks, David
Re: Reclaiming lists.{perl,cpan}.org
Ken Williams wrote: Hi, If you look at http://lists.perl.org/ or http://lists.cpan.org/ (the former just redirects to the latter) you'll see a list that apparently has lost its maintainer. For instance, I've tried variously over the past 6 months to change the address of the Module::Build list, but never gotten a response. I thought you opened a ticket on listowner to have that list moved under the aegis of perl.org, no? And you haven't had a reply? I thought that was wrapped up. Robert Spiel and I started to work on lists.perl.org when lists.cpan.org fell over last year. Then cpan.org came back up again and the project ran aground, and Robert redirected lists.perl.org to lists.cpan.org in the meantime. Robert and Ask have the stats for [EMAIL PROTECTED] lists, it's the externally-hosted lists that are hard to track. In the meantime, feel free to open RT tickets on perl.org with updates. Mailing [EMAIL PROTECTED] will do that. Thanks, David
Re: James Freeman's other modules
I was also wondering whether - given that backpan exists so people can always find them if they really want them - there shouldn't be a mechanism for removing modules that are unloved and unused. That strikes me as a little severe. Some may be packaged with OS distributions. Heap::Priority sounds useful, as does Algorithm::LCSS. What needs to be done, and was discussed recently, is have a way of detecting dead modules, based on untaken RT tickets and author uploads. David
Re: James Freeman's other modules
Smylers wrote: [stuff about detecting dead modules] I'm not entirely sure what problem you're trying to solve here. But that's largely irrelevant -- because however good your idea is, there's bound to be somebody in the Perl community questioning it or objecting to it! So don't wait for approval: just do it, whatever it is, then show folks. One thing that makes it difficult to play along at home is that there's no easy way to obtain a dump of the cpan.org RT tickets, short of violently scraping a web server that's already slow enough as it is. If one could obtain a tarball of a tab-delimited file containing o RT id o status o last update o distribution o subject of all tickets, or all non-resolved tickets, well there's a language that's good at munging such data and producing all kinds of interesting reports. Is Jesse Vincent the person to ask for this? David
Re: CGI::Simple
Andy Armstrong did write: Once Ask or whoever gives me permissions the new release will appear in the index. For now it can be found here: http://cpan.org/modules/by-authors/id/A/AN/ANDYA/CGI-Simple-0.078.tar.gz Ping brian d foy, but I imagine he's already watching this thread. DAvid
Re: List::RewriteElements
James E Keenan did write: I am preparing a module for CPAN tentatively titled List::RewriteElements. Given a list of data records, typically in the form of a flat file, optionally containing a header row, I am frequently asked to generate a new file in which each record is transformed according to some rule or deleted according to some criterion. This module makes it easier for me to do so. oooh, me too. I wish you had published this two months ago, because that's all I've been doing recently. I have not yet implemented all of the module's functionality (as specified in the documentation), but what is present has high test coverage. I am wondering if people have any better suggestions for a name for the module. I've thought of things like List::Transform, List::TransformRecords, etc. I vote for Transform. Possibly more Data than List but I wouldn't argue it for long. Question: (?:how)? does your module deal with positional records (that is, fixed width fields)? as opposed to delimited records? For instance, I sometimes want to apply a hash lookup to the fourth field of ten, to map values from one system to another. David -- It's overkill of course, but you can never have too much overkill.
Re: Following up on a CPAN review
David Landgren wrote: List, I've just noticed a scathing review on one of my modules. Ok, it's Tie::Cycle::Sinewave and a bit of a joke, but nonetheless, it does seem to work just fine for me. Dear List, you may ignore this question. It turns out that the review in question was probably childish retaliation for a scathing review of my own on the reviewer's own modules. I don't know how I missed it the first time around, but 'chitresh' is probably pauseid CHI == chitresh sharma, who released a module named NCBI. I reviewed it a while back, and found it wanting. The end. -- Much of the propaganda that passes for news in our own society is given to immobilising and pacifying people and diverting them from the idea that they can confront power. -- John Pilger
Following up on a CPAN review
List, I've just noticed a scathing review on one of my modules. Ok, it's Tie::Cycle::Sinewave and a bit of a joke, but nonetheless, it does seem to work just fine for me. But chitresh thinks that it's Highly buggy and not reliable. Many false positives. I think the author should calculate the senstivity specificity of the modules first. I haven't the faintest idea what the chap is talking about, and there are no open tickets in RT. So while I appreciate the review, even negative, I'm at a loss as to figure out what I could do to improve it. (So I marked the review as unhelpful, heh). How can I get in touch with the person to find out what they didn't like about it. Then at least I might be able to do something. Thanks, David -- Much of the propaganda that passes for news in our own society is given to immobilising and pacifying people and diverting them from the idea that they can confront power. -- John Pilger
Re: Take back your modules!
Andy Lester wrote: On Sep 7, 2006, at 9:08 AM, Mark Stosberg wrote: I say: If you are care about a module's maintenance, start acting like you own it, being considering that others, especially the current maintainer, may feel the same way. Nice. Worthy of a use.perl.org post so others can see it. Maybe perlmonks too. Quite. Sometimes I think that someone should start writing a This week on module-authors summary. David -- Much of the propaganda that passes for news in our own society is given to immobilising and pacifying people and diverting them from the idea that they can confront power. -- John Pilger
Including externally-defined constants
Authors, I have a design issue with a module I'm writing. I posted a question on Perlmonks a while back and got nothing useful, which perhaps indicates that the question was poorly phrased. So I'll try again here. I have a series of associations in a file: FOO 1 BAR 2 QUUX 3 It's easy enough to produce a C header: #define FOO 1 #define BAR 2 #define QUUX 3 that is included in an XS file; and a perl file: use constant FOO = 1; use constant BAR = 2; use constant QUUX = 3; that is required by a .pm file. I (now) know how to do that with rules that I add to the Makefile.PL script. The problem is that these associations are private to the XS and Perl module. The client code does not need to know about them, and in fact shouldn't. So I don't want client code to know the file exists, and people won't go around trying to include it. So the Perl file has to go. So what I really want to have a way of embedding the generated constants in my module, as it wends its way to the blib/lib directory: package P; use constant FOO = 1; use constant BAR = 2; use constant QUUX = 3; sub new { ... } As a bonus, the module avoids a failure mode that would occur when some bright spark deletes the .pl file. I could do something like a P.template file that contains package P; #INCLUDE_CONSTANTS# sub new { ... } and have some code that does an s/#INCLUDE_CONSTANTS#/$some_string/ on the file, to produce a P.pm file. Also note that the associations are fixed: there aren't going to be any more or less on any machines due to local differences. Sort of like hint files, in a way. What I really want to know is whether someone has already encountered this problem, and how they solved it. I'd like to be able to profit from the experience, and I figure if I structure things the same way, it will be a Best Practice, and people will more readily understand what's going on, which is a win all round. Thanks, David -- Much of the propaganda that passes for news in our own society is given to immobilising and pacifying people and diverting them from the idea that they can confront power. -- John Pilger
Re: Module naming advice
Jeff Lavallee wrote: Hi all, before I upload a new module, I thought I'd make sure the namespace I intend to use makes sense. I've been working on a set of modules to make interacting with the next generation of Yahoo's marketing web services easier. The modules insulate the user from a lot of the SOAP::Lite details. Currently, I'm planning on calling it Yahoo::Marketing. Yahoo::Marketing.pm itself would just serve as a place holder (with POD) for the time being, with all the meat under that namespace (for example, Yahoo::Marketing::AccountService, Yahoo::Marketing::Account, etc). The POD-in-progress for Yahoo::Marketing is below. Any thoughts/comments/suggestions about the intended namespace would be greatly appreciated. There is already at least one module in WWW::Yahoo::*. I would suggest slotting your modules in at that level as well. David -- hope still, a little resistance always maybe stubborn tiny lights vs. clustering darkness forever ok?
Re: RFC: Set::Partition
Xavier Noria wrote: On May 22, 2006, at 20:14, Xavier Noria wrote: That takes advantage of the fact that we want to divide a given set in just two subsets of fixed size. A partitions generator may be added to the module soon, but until then I think there's room for Set::Partition. Indeed, I just uploaded to PAUSE Algorithm::Combinatorics 0.15 with generators of partitions, and partitions of a given size. To solve the original problem with these subroutines one generates partitions of size 2 and filters out those whose subsets have size 1/4, as in the session copied below. [...code snipped...] Nice. I lacked the time to follow up on this originally. My original snippet was perhaps too trivial. The particular itch I wanted to scratch had four subsets, which would require a certain amount (too much, IMHO) of make-work code for this approach to be viable. David -- It's overkill of course, but you can never have too much overkill.
RFC: Set::Partition
Authors, I have a list of elements, qw[a b c d e] and I wanted to steal some code from CPAN to divvy it up into two subsets of 2 and 3 members. And enumerate all the possibilities. For instance: (a b) (c d e) (a c) (b d e) (a d) (b c e) (a e) (b c d) (b c) (a d e) (b d) (a c e) (b e) (a c d) (c d) (a b e) (c e) (a b d) (d e) (a b c) I didn't find any code to steal, which surprised me. I searched for various combination of Set List Data Partition and drew a blank. So I wrote some code, and the documentation looks like this: NAME Set::Partition - Enumerate all arrangements of a set in fixed subsets VERSION This document describes version 0.01 of Set::Partition, released 2006-05-22. SYNOPSIS use Set::Partition; my $s = Set::Partition-new( list = [qw('a' .. 'e')], partition = [2, 3], ); while (my $p = $s-next) { print join( ' ', map { (@{$p-[$_]}) } 0..$#$p ), \n; } # produces (a b) (c d e) (a c) (b d e) (a d) (b c e) (a e) (b c d) (b c) (a d e) (b d) (a c e) (b e) (a c d) (c d) (a b e) (c e) (a b d) (d e) (a b c) DESCRIPTION Set::Partition takes a list of elements (scalars or references or whatever) and a list numbers that represent the sizes of the partitions into which the list of elements should be arranged. The resulting object can then be used as an iterator which returns a reference to an array of lists, that represents the original list arranged according to the given partitioning information. All possible arrangements are returned, and the object returns undef when the entire combination space has been exhausted. METHODS new Creates a new Set::Partition object. A set of key/value parameters can be supplied to control the finer details of the object's behaviour. list: points to the list of elements in the set. partition: the list of integers representing the size of the partitions used to arrange the set. The sum should be equal to the number of elements given by list. If it less than the number of elements, a dummy partition will be added to equalise the count. This partition will be returned during iteration. If the sum is greater than the number of elements, new() will croak with a fatal error. nextReturns the next arrangement of subsets, or undef when all arrangements have been enumerated. reset Resets the object, which causes it to enumerate the arrangements from the beginning. $p-reset; # begin again DIAGNOSTICS None. NOTES The order within a set is unimportant, thus, if (a b) (c d) is produced, then the following arrangement will never be encountered: (a b) (d c) On the other hand, the order of the sets is important, which means that the following arrangement *will* be encountered: (c d) (a b) __END__ Now my observation is that Set::Partition seems a little to generic and/or I would be trampling on namespace with the proposed name. So either do people have strong feelings about the name and/or a better name for a module? Hint: When you read the subject of this message, did you have a pretty good idea of what this module does? Or did I overlook a module that already does this? Thanks for your insights, David -- It's overkill of course, but you can never have too much overkill.
Re: RFC: Set::Partition
Eric Wilhelm wrote: # from David Landgren # on Monday 22 May 2006 09:52 am: print join( ' ', map { (@{$p-[$_]}) } 0..$#$p ), \n; Stylistically, I think it is much clearer to not use the index if you don't need it. print join(' ', map { (@$_) } @$p ), \n; Oh duh! Yes very nice. I plead Work in Progress. Thanks, David -- hope still, a little resistance always maybe stubborn tiny lights vs. clustering darkness forever ok? -- g!ybe
Re: RFC: Set::Partition
Kurt Starsinic wrote: On 5/22/06, David Landgren [EMAIL PROTECTED] wrote: I have a list of elements, qw[a b c d e] and I wanted to steal some code from CPAN to divvy it up into two subsets of 2 and 3 members. And enumerate all the possibilities. [ . . . . ] Now my observation is that Set::Partition seems a little to generic and/or I would be trampling on namespace with the proposed name. So either do people have strong feelings about the name and/or a better name for a module? Hint: When you read the subject of this message, did you have a pretty good idea of what this module does? Or did I overlook a module that already does this? Have you looked at Math::Combinatorics? Well, apart from its abysmal documentation, no, not much. Nor does the much better Algorithm::Combinatorics help here. The difference is that an element doesn't permute within a set, which cuts down on a lot of arrangements. Thanks, David -- hope still, a little resistance always maybe stubborn tiny lights vs. clustering darkness forever ok? -- g!ybe
Re: Proposed module names
David Golden wrote: Jim Schneider wrote: I have three modules I am preparing to submit to CPAN, and I was hoping to get some input on the names. The modules are: 1) DBIx::Class::Simple - a simpler alternative to DBIx::Class, but alas, not compatible (not even a little bit). It takes a collection of data structures that describe your tables, and turns it into a collection of classes that can be used to access them. I'm also open to the name DBIx::Simple::Class or DBIx::Simple::Object [...] I think you may be best if you come up with your own DBIx::* name that captures what you feel is distinctive about your module -- beyond it just being simple. Seconded. Simple modules never are. I'm not trying to be flippant. If the documentation isn't equally simple (for instance, fits on a screenful with no additional provisos or exceptions) then the person using it spends as much time learning how to use it as a supposedly more complex module. 2) WWW::Scraper::Zip4 - a simple web scraper to retrieve address information from the USPS website. Again, there is already an unrelated WWW::Scraper, so I'd avoid that. There seems to be an emerging style for these kinds of web interfaces that is site-first, task-second, so how about this (with the additional clarity of the proper name of a nine-digit zip): WWW::USPS::ZipPlus4 Again, seconded. I was going to say the same thing (although I suppose the Zip4/ZipPlus4 distinction refers some sort of regional context that is lost on me). 3) Well, I'm currently calling it TemplateLoader, but that's too horrible for words. Your provide some particulars on the module use line, and it creates a method in the calling class that loads the template. Any suggestions for this one would definitely be appreciated. This is far too generic a description to offer help. Given the myriad templating systems already out there, can you describe what your module does that is distinctive? That's usually a good place to start when thinking about names. Or a snippet showing how the module (?:sh|c|w)ould be used. David -- It's overkill of course, but you can never have too much overkill.
Re: [RFC] Samba::LDAP namespace?
Gavin Henry a écrit : Dear List, I would like your opinion on the namespace: Samba::LDAP then Samba::LDAP::Group Samba::LDAP::Password Samba::LDAP::User I want to do this as I am halfway through writing an application called SOSA - Samba and Open-xchange Simple Administrator using Catalyst (which is to be released GPL) and I don't want to have to rely on the command line smbldap tools from idealx being installed, so I want to CPAN-ize them and have the modules installable from there. Smb seems to be more common on CPAN, as well as most package systems I am familiar with. I would be inclined to go with Net::Smb::LDAP, which leaves open the possibility that someone could do something useful with Net::Smb. David -- It's overkill of course, but you can never have too much overkill.
Re: New module: FLV file parsing
Eric Wilhelm wrote: # from David Nicol # on Wednesday 30 November 2005 02:18 pm: isn't there a multimedia name space? name spaces per-product that is being supported make sense --- Flash::parseFLV perhaps? What else will appear in the Flash:: namespace? Will macromedia release a pure perl version? What all file format parsers and dumpers have in common is that they deal with File Formats. In a lot of cases, the only module that is going to be created is for that format. I'm working on CAD::DXF for now, but would rather name it FF::DXF, similarly with FF::SVG, FF::XAR, FF::PDF, etc. FF::FLV sounds best to me. In about 10 days time, I'm going to forget utterly that FF means File Formats. Does it need to be so terse? Tossing out another suggestion with this in mind: Parse::File::FLV David -- It's overkill of course, but you can never have too much overkill.
Re: [RFC] Pod2::Perldoc - new module proposal
Kurt Starsinic wrote: On 11/22/05, Enrico Sorcinelli [EMAIL PROTECTED] wrote: Pod2::Perldoc is an improved distribution of Perldoc, the program for reading Pod documentation. It's available at http://modperl.it/POD2-IT/Pod2-Perldoc-3.14.tar.gz Enrico, Your patches look both useful and interesting. I recommend that you apply a bit more pressure to get your patch integrated into the core (or to get some valid criticism on your patch), rather than publishing a new module. This is what I request of you: 1. Publish your patch to perl5-porters one more time. *Make sure* that it applies cleanly against 5.9.2. Cc: Sean Burke and me. 5.9.2 was released over six months ago, and the source has moved on quite a bit since then. The patch must apply cleanly against blead for it to have a chance. 2. Wait a couple of days. 3. If and when you don't get a response, email Hugo van der Sanden and Rafael Garcia-Suarez, cc:ing me. Ask them to apply your patch. Point them at the URL for the archived email from (1.). There's no point in hassling Hugo about this, he's no longer in the loop. David -- It's overkill of course, but you can never have too much overkill.
Re: RFC - Data::SelectWithoutReplacement
And Smylers did write: David Landgren writes: ... my main question concerns the name. Is it good? Did you understand what the module would do when your saw the subject of this message in your inbox? No. And I still don't understand what WithoutReplacement means in this context -- after reading those terms in the title, I was expecting them to crop up again somewhere in the synopsis or the description. Ah yes, well, like any unfinished project the documentation needs work. The implication is that ordinarily when selecting something it is replaced -- but I've no idea what that means. That would mean that from (a, b, c), you could draw, for example, (a, a, c) or (a, b, b). Is there a better name(?:space)? for this? It looks to me that this module when given a set returns its power set: http://en.wikipedia.org/wiki/Power_set so perhaps Data::PowerSet is appropriate. Aha! Quite. Thanks for the term. Except that it isn't clear what your module does if the input list contains duplicate items. Sets can't contain duplicates; if your module just sees a list with 5 items in it and permutes those items by their indices then it wouldn't even notice the dupes, so obviously it isn't (solely) working with sets. Indeed. If the user wants to have duplicate items, who am I to throw up my mathematical-purity arms in horror? And it turns out that there's quite a good reason why one would want to: I have 4 coins in my pocket: 2, 2, 5, 20. What amounts can I make with that? use Data::PowerSet; my $d = Data::PowerSet-new( @ARGV ); while( my $r = $d-next ) { print sum(@$r), \t(@$r)\n; } sub sum { my $s = 0; $s += $_ for @_; return $s; } __END__ gives: 19 (2 2 5 10) 17 (2 5 10) 17 (2 5 10) 15 (5 10) 14 (2 2 10) 12 (2 10) 12 (2 10) 10 (10) 9 (2 2 5) 7 (2 5) 7 (2 5) 5 (5) 4 (2 2) 2 (2) 2 (2) 0 () A neat thing that falls out of this is that so long as your amounts are sorted, you only need to keep track of the previous set to track duplicates. But the module name is supposed to be best fit rather than perfect, so even if your module also provides analogous behaviour on things that aren't sets, I don't think that would bar it from using PowerSet in its name. Phew. (I rule out Algorithm::*, since the you're not actually supposed to care how it does its business, only that it does it). That's a good point, and I completely agree with you on it. So, does anyone have an objection to Data::PowerSet? Thanks, David
Re: RFC - Data::SelectWithoutReplacement
And Xavier Noria did write: On Nov 17, 2005, at 22:45, David Landgren wrote: People, I have a simple module written and as far as I can tell, there's nothing on CPAN that does this. (Algorithm::Permute might, but it segfaults on my machine). There are some modules dealing with this kind of stuff, with more generic interfaces. For instance Math::Combinatorics or Algorithm::Combinatorics. I've had a long look at Math::Combinatorics, and while it could be used to generate a power set, it would take a certain amount of make-work code. Plus, the documentation is awful, and there are no examples to try out. Regarding the generic interfaces, by a funny coincidence I had coded up the same set of interfaces myself, plus a bit more. So the useability should be acceptable. Thanks, David
Re: RFC - Data::SelectWithoutReplacement
And Xavier Noria did write: On Nov 19, 2005, at 10:31, Xavier Noria wrote: On Nov 19, 2005, at 9:48, David Landgren wrote: And Xavier Noria did write: [...] I've had a long look at Math::Combinatorics, and while it could be used to generate a power set, it would take a certain amount of make-work code. Well, with Algorithm::Combinatorics, which I know better, you'd just do: Argh! I wish you'd been less modest yesterday and pimped your module harder. I wasted a certain amount of time with M::C. I think shied away from A::C merely because of the Algorithm in the name. In any event, the documentation is a delight to read, and it's immediately obvious how to use it, even if combinatorics is not your (my) forte. my @power_set = (); push @power_set, combinations([EMAIL PROTECTED], $_) for [EMAIL PROTECTED]; I want to be more explicit there, just in case. I don't mean that since the power set can be computed that way there's no room for your module. And, of course, the fact that Algorithm::Combinatorics is mine is anecdotal, I would provide the same feedback if the module was from someone else (as I did with Math::Combinatorics). I just wanted to say that there exist modules to compute the power set in a short albeit indirect way, so you take an informed decision. If you decide that you'd like to provide an explicit, clear way to construct power sets with a dedicated module that's fine and makes sense! Ok, I'll go ahead then. Thanks for your input (love your domain name, btw :), David -- It's overkill of course, but you can never have too much overkill.
Re: RFC - Data::SelectWithoutReplacement
Xavier Noria wrote: On Nov 17, 2005, at 22:45, David Landgren wrote: People, I have a simple module written and as far as I can tell, there's nothing on CPAN that does this. (Algorithm::Permute might, but it segfaults on my machine). There are some modules dealing with this kind of stuff, with more generic interfaces. For instance Math::Combinatorics or Algorithm::Combinatorics. arg. I wish I'd seen Math::Combinatorics earlier. I did search for combination but somehow completely managed to miss it. And it's the first result! Thanks for the pointer, David -- fxn -- It's overkill of course, but you can never have too much overkill.
RFC - Data::SelectWithoutReplacement
People, I have a simple module written and as far as I can tell, there's nothing on CPAN that does this. (Algorithm::Permute might, but it segfaults on my machine). From the POD: Data::SelectWithoutReplacement - Generate all subsets of a list of elements =head1 VERSION This document describes version 0.01 of Data::SelectWithoutReplacement, released 2005-mm-dd. =head1 SYNOPSIS use Data::SelectWithoutReplacement; my $d = Data::SelectWithoutReplacement-new( 3, 1, 4 ); while (my $r = $d-next) { print @$r\n; } # prints 3 1 4 1 4 3 4 4 3 1 1 3 __END__ There are a few more goodies that I've thrown into the mix but my main question concerns the name. Is it good? Did you understand what the module would do when your saw the subject of this message in your inbox? Is there a better name(?:space)? for this? (I rule out Algorithm::*, since the you're not actually supposed to care how it does its business, only that it does it). Thanks for your input, David
Re: Tests needing user parameters
Jess Robinson wrote: On Wed, 19 Oct 2005, Ken Williams wrote: On Oct 19, 2005, at 4:50 PM, Jess Robinson wrote: My module will login to a web service and manipulate data programmatically.. Nothing critical I assure you, just a tool ;) Since theres no dummy/test account that I know of, I'll need the users account/email address and password to login. Typically you'd add some code to the Makefile.PL or Build.PL that asks the user for a username/password to use for testing, and gives the user an option to skip those tests. DBI modules often do this, for example (where the username/password is for a database to access). If you're using ExtUtils::MakeMaker, you'll have to find some file to stash the information, probably somewhere in t/ . If you're using Module::Build, have a look at the notes() method, which is for caching this kind of information. Right, I'd seen a few modules do this, but.. Is there a *standard* way of doing it? Those Makefile.PLs tend to look cluttered and confusing IMO.. a nice: use Test::Auth; get_user_fields(user, password); would be preferable.. (hmmm, could write something that does that, using IO::Prompt.. anyone interested?) If there's a standard way of doing it, it would be really nice that it understood when it was being run in a smoke environment, and asked no questions and used built-in defaults. I haven't had time to look at this issue, but after having been smoking CPAN uploads for a while, I'm astonished at the number of modules that sit hanging on STDIN waiting for input. David Jess -- It's overkill of course, but you can never have too much overkill.
Re: Tests needing user parameters
A. Pagaltzis wrote : * David Landgren [EMAIL PROTECTED] [2005-10-20 10:30]: [...] If there's a standard way of doing it, it would be really nice that it understood when it was being run in a smoke environment, and asked no questions and used built-in defaults. That’s exactly what EU::MM’s prompt() function and Module::Build’s prompt() method do/are for. Ha, ++aristotle. I can see I'll be filing bug reports/patches for a while :) David Regards,
Re: Tests needing user parameters
A. Pagaltzis a écrit : * David Landgren [EMAIL PROTECTED] [2005-10-20 10:30]: [...] If there's a standard way of doing it, it would be really nice that it understood when it was being run in a smoke environment, and asked no questions and used built-in defaults. That’s exactly what EU::MM’s prompt() function and Module::Build’s prompt() method do/are for. Hmmm. I just looked at XML::Twig, because I remember smoking it a few weeks ago and it blocked, asking about whether I wanted to install various doodads. I checked the source this afternoon: http://search.cpan.org/src/MIROD/XML-Twig-3.22/Makefile.PL In which we clearly see that mirod is using EU::MM's prompt() function. So there's something else occurring. Perhpas CPANPLUS so cleverly emulates a real session that EU::MM can't distinguish whether STDIN is attached to a tty or not. Time to go gonzui diving. David
Re: RFC - Test::Stupid module
A. Pagaltzis wrote: * Robert Rothenberg [EMAIL PROTECTED] [2005-08-21 13:40]: No matter what wiz-bang new module starter system somebody comes up with, there will be some kind of boilerplate text. Unless maybe it asks you to write the documentation before you write the module. Maybe the solution is to a) explicitly use placeholder marks and b) write the module starter tool in such a way that one can fill in placeholders after initially creating the module. That way the distro builder can find the placeholders without groping for known boilerplate, and the user can either remove the placeholders manually when editing, call the starter tool again later as guidance, or just use the its postponed fill-in as part of his personal modus operandi. Or have Module::Starter know how to include site-local boilerplate. I like addnig a fixed blurb on how to report bugs (and no doubt other stuff but that's what I can think of without looking). If M::S knew how to fetch that during a run it would save me from having to set up a local template such as brian d foy outlined earlier. David
Re: Regexp code feature
Nicholas Clark a écrit : On Mon, Jul 25, 2005 at 12:07:27PM -0500, Chris Dolan wrote: This is exactly the sort of feedback I was hoping to see, however. May I recommend that you add a note about that $^R problem to the docs at annocpan.org? http://annocpan.org/~NWCLARK/perl-5.8.7/pod/perlre.pod Annotations are designed for real users. *This* is a bug in the implementation that needs to be documented (preferably fixed) annocpan is not the *master* copy of the documentation of anything. As ever, please report the bug to the maintainer of the module (via the correct mechanism for that module), so that the master can be updated. Otherwise the bug will never be fixed, and the incorrect documentation will continue to propagate elsewhere. For the archives, a bug report *was* filed against this behaviour in December 2004, as #32840 $^R value lost in (?:...)? constructs I could mail a patch to p5p to document it in perlre.pod if you think it's important enough. David
TRIEs in the core (was: Re: Module for simple processing of log files_
Orton, Yves wrote: [...] shameless plug But David and the other Regexp authors need to update their code to take advantage of 5.9.2 and later innate TRIE optimisation. They still have room for optimising the patterns that they build but they will need to build fairly different looking patterns to really harness the TRIE regop. /shameless plug No, I've been following the threads on p5p. I've been looking hard at the stuff I do, and the patterns I generate come from little patterns that all tend to feature lots of metacharacters (otherwise I'd be doing hash lookups or index()), correct me if I'm wrong, such patterns don't benefit from your trie optimisations. E.g., what happens with FROM MRS\. [A-Z]+ [A-Z]+ FROM MRS [A-Z]+ [A-Z]+ FROM MR [A-Z]+ [A-Z]+ FROM MR\. [A-Z]+ [A-Z]+ FROM: MRS\. [A-Z]+ [A-Z]+ FROM: MRS [A-Z]+ [A-Z]+ FROM: MR [A-Z]+ [A-Z]+ FROM: MR\. [A-Z]+ [A-Z]+ (actual patterns lifted from Nigerian spam). R::A produces FROM:? MRS?\.? [A-Z]+ [A-Z]+ Instead of the whole mess or'ed together. I'm seriously lacking time to benchmark the differences. David
Re: Module for simple processing of log files
Philippe 'BooK' Bruhat wrote: Hi, [...] The module works like this: use Blah;# not a very good name for CPAN :-) Acme::Blah! :o) my $blah = Blah-new( delimiter = ':', fields= [qw( bap clank glipp plop )], show = \show_my_data, ); # quelques infos utiles $blah-add_filter( bap = 'eq zlopp', clank = '!~ /clunk_eth/', A hash is unordered. Um hang on, or is this a list of pairs or a hash? ); $blah-add_file( glob *.log ); $blah-run; When the run() method is called, the object compute a piece of Perl code which is then eval()ed (with a localised @ARGV). The computed code is the following (note the use of arrays for the selection pass and of a hash for the processing): while() { chomp; my @data = split qr{:}; if(( $data[1] !~ /clunk_eth/ ) ( $data[0] eq zlopp ) ) This is ordered. But in any case, it's not in the same order as above. I would like to be able to specify order in which the checks are run, so as to be able to evaluate the check that fails 99% of the time first. Also, I'm not sure what to suggest, but... bap = 'eq zlopp', ...feels icky. I'd rather something that would spit out errors at compile time, not at eval time. But I can't think of anything approaching that level of tersity. At the very least: bap = { 'eq' = 'zlopp' } clunk = { '~!' = qr/^foom\d+$/ } sput = { 'between' = [10, 100] } Hmm, how do I add a new conditional widget, like 'between' above? e.g. I want to extract all HTTP transactions whose lengths are prime fibonacci numbers. David
Re: what namespace for future new module ?
Ofer Nave wrote: A. Pagaltzis wrote: * Cédric Bouvier [EMAIL PROTECTED] [2005-03-10 10:25]: Thank you for the hint. I quickly looked on CPAN and there doesn't seem to be many modules under Cluster::, besides Cluster::Init which is more geared towards High Availability. I don't find Cluster:: sounds right. Parallel: alone isn't sufficient since this involves multiple computers, not just multiple processes. I think something in Net:: would be most appropriate. And while cluster is the means to do this, what you're doing as such is usually referred to as distributed execution or some such. So maybe Net::ComputeDistributed? It's a little long, but I think it's absolute precise in describing the purpose. Regards, I think it's a mouthful, and still not quite right. There is currently no Distrib:: or Distributed:: namespace. How about starting one? Like Parallel::, but implying across hosts, not just procs, as A. Pagaltzis so well puts it. In your case, your module could be Distributed::Simple. Distributed, yes, but Distributed::Simple, no. In general I dislike modules named *::Simple. Because they never are. And doubly more so if it's not actually simplifying what another module, e.g. Distributed::Complicated::Horribly, already does, since there is no other module for the moment. What about something like Distributed::Server and Distributed::Client, and bundling them up into a Bundle::Distributed? or Distributed-tools. Again, posting the Synopsis would help. David
Re: Introduction Letter
Andrew Savige wrote: [...] Naming. I wonder if your: { use_return = 1 }, is the recommended Perl style for named parameters? I thought not until I noticed HTML::Parser uses this style. Alternatives are I like this style. CamelCase style (a la XML::Parser, for example): { UseReturn = 1 }, I think this is yucky. Its use is eschewed for variable names (perlstyle says that it's harder for non-native English speakers) so I don't see that it has any legitimate use for hash keys (which are nothing more than second-class variable names). or dash-option style (a la CGI, for example): { -use_return = 1 }, I'm not too fond of this either. I've always felt that it's trying to emulate command line switches, poorly. It fails on multi word names. A longword switch should be written as --use-return, at least according to long-standing tradition. It grates on my nerves when I see switches that mix dashes and underscores like --use_return. That just feels wrong, as if the author isn't aware of prior art. And so if you accept my hypotheses that --use-return is the Right Thing, then you can't specify that as a hash key bareword. Hence I judge it to be a failure. So I would tend to consider that { use_return = 1 } is the preferred way. I certainly find it to be the most appealing from a visual point of view. I'm damned if I can find a reference clearly stating which one of these three styles is preferred. Can anyone point me to a reference on this? Nor can I, but my gut feeling is that most of the modules I use on a regular basis use the first form. David
Re: Name for GStreamer bindings
Mark Stosberg wrote: On Tue, Feb 22, 2005 at 09:20:19PM -0500, Kevin C. Krinke wrote: On Wed, 2005-02-23 at 01:20 +0100, Torsten Schoenfeld wrote: Aloha, GStreamer is a powerful and pretty popular media framework. GNOME already uses it extensively, and KDE just started to. It's based on GLib and uses its object oriented C API style. The objects have names like GstQueue or GstElement. ... Gnome2::Gst:: makes sense to me. Except it's not tied to Gnome. KDE users it too. One option would be to use a very clear top level name space and used 'aliased' internally to call it 'Gst'. http://search.cpan.org/~ovid/aliased-0.11/lib/aliased.pm Another alternative is to let the user choose. Take a look at Yves' Data::Dumper::Streamer module. During the installation, the user has a choice of additionally installing it in the DDS namespace (this does not occur by default). http://search.cpan.org/~yves/Data-Dump-Streamer-1.10/lib/Data/Dump/Streamer.pm#Installing_DDS_as_an_alias (unwrap as required). David
Re: Facing a problem in perl telnet module
Shivageetha C wrote: Hi, Hello, I am Shivageeta S. Choodi, working for Novell, Bangalore in system testing group. This is a mailing list for authors of Perl modules, to help them discuss issues of publishing modules for the use by the worldwide Perl community. It is not a general help list. Having said that, the Perl community prides itself on being helpful and offering support for people who are having problems with Perl. I suggest you head over to Perlmonks (http://www.perlmonks.org/), set yourself up an account (if you want) and post your question there. I'm sure you'll get a quick response to your problem. I have used Perl for the test automation. I am facing a problem in telnet module of Perl. The problem details are as follows and the script (around 10 lines) is also attached. You appear to have attached an MS-Word document. If it's just ten lines, you could repeat it ad verbatim. Hint: if you do post to perlmonks, take your script and enclose it like this: code ... your script here... /code Good luck, David
Re: When Did a Module Become Core?
Paul Johnson wrote: On Mon, Jan 17, 2005 at 05:52:39PM -0500, James E Keenan wrote: Andy Lester wrote: On Mon, Jan 17, 2005 at 12:32:06PM -0500, James Keenan ([EMAIL PROTECTED]) wrote: What is the simplest way to determine for a given CPAN module (a) whether it is part of the Perl core; (b) when it became part of the core (i.e., which version of Perl); and (c) which version is considered core? Richard Clamp's marvelous Module::CoreList. Has a handy command line tool, too: $ corelist File::Temp File::Temp was first released with perl 5.006001 So simple, it's positively Lazy! And for the even lazier, who can't even be bothered to install a module: http://www.twoshortplanks.com/modulecorelist/ And for the truly lazy who think that clicking on an URL and filling out a form is too much work, with WWW::Mechanize you could... oh, wait... David
Re: When the prophet won't go to the mountain, the mountain must go to the prophet.
A. Pagaltzis wrote: Oh look, it's an Atom newsfeed for cpanratings.perl.org: Man, when I read the subject I thought your email was going to be about penis enlargement. Excellent work. And you've got a feed for QDB. Marvellous. David
Re: Module Name: Net::Lite::FTP
Dariush Pietrzak wrote: On Wed, 5 Jan 2005, Austin Schutz wrote: Why not just add the functionality to Net::FTP? Or you could subclass Net::FTP and call it something clever like Net::FTP::TLS. Because Net::FTP is written in a way that makes it extremely hard to make needed modifications. It is a very well-thought, large and organized object hierarchy. Net::FTP? I tried adding TLS support to it almost 2years ago, contacted it's author, heard that there is large redesign coming, which will allow changes needed for encryption, however there is still no TLS in Net::FTP, and I'm sitting here on encryption-enabled client for the past two years. Do you think that I should keep it to myself for the next few years? No, you should release it ASAP. Additionally Net::FTP works with very large range of ftpservers, which fills code with lots and lots of special cases, this (and elaborate object hierarchy) makes it very hard for someone to come and extend it, and after trying to do that, I can only conclude that I'm too stupid to be playing with its internals. Well that doesn't jibe with well-thought and organized, but I guess that means I'm stupid too. I've been using Net::FTP for 8 years or so, and I never even knew there was a hierarchy. Or are you referring to Net::Cmd? I'd still favour going with the name Net::FTP::TLS, even if it isn't subclassed from Net::FTP. If the redesign ever comes down the pipe, you could reimplement by subclassing and keep the interface the same? I think that people will look for Net::FTP and drill down, not go up from Net::FTP and do a breadth-first search in the CPAN namespace. Or do you foresee that it might also be possible to write Net::TLS::SMTP, Net::TLS::LDAP, Net::TLS::Foomatic? David
License unknown on search.cpan.org
People, I happened to look at my module through search.cpan.org and noticed that the License field says unknown. The pod states that the module is released under the same terms as Perl itself. Am I correct in assuming that if I add license: perl to the META.yml file, this will correct the situation? Thanks, David
Taking over maintenance of PDF.pm
Hello, I want to take over PDF.pm (I have a few patches for it). I've been talking back and forth with a guy who used to work with the author, and I quote: quote David, SANFACE Software is a company and has the cpan entry sanface. Antonio worked for SANFACE when he developed pdf.pm. I know he don't want to support it anymore by 2 years. It's few months I'm not able to contct him by email. He doesn't work anymore in SANFACE. Cedric /quote So, what's the best way forward? Thanks, David
Re: Taking over maintenance of PDF.pm
Sébastien Aperghis-Tramoni wrote: Selon David Landgren [EMAIL PROTECTED]: Hello, I want to take over PDF.pm (I have a few patches for it). I've been talking back and forth with a guy who used to work with the author, and I quote: David, before spending time patching PDF.pmd, did you take a look at PDF::API2? It is more recent and still actively maintained. http://search.cpan.org/dist/PDF-API2/ Yes, I looked at that, but it doesn't have the methods I needed. Given my copious amounts of free time, I don't plan on doing a whole lot of work anyway; I see the role as more of a caretaker. If anything, I think it would be worthwhile deprecating PDF the module out altogether. insert argument about top-level namespace here David
Re: What name for a printer status supplies module?
Ovid wrote: --- Ken Williams [EMAIL PROTECTED] wrote: If I were you I'd not use classes to model that part of it. Just have a Printer::Status::HP4500 (or HP::HP4500 or whatever) object with a components() or consumables() method that returns a hash mapping name to properties. E.g.: If you say you're going to take Vienna, take Vienna. Napoleon In this case, if an OO interface is provided, it should be used. A hash mapping makes it very easy to mitsype (sic) the key names. It's more difficult to mistype method names and have it still work. If one doesn't want the overhead of creating a class just for the returned data, one call always use the excellent Hash::AsObject (http://search.cpan.org/~nkuitse/Hash-AsObject-0.05/) module. Oooh, I didn't know about that module. That's very nice actually, because a kit has quite a number of attributes, not just percent remaining. In fact, an HP 4600 kit doesn't even have that. What it does have is number of pages printed so far, number of estimated pages remaining, based on a historical page coverage of x%, serial number and a few other odds and ends. Hash-AsObject will remove a lot of the grunt work, thanks for the tip. David
What name for a printer status supplies module?
List, I have some code that queries an HP LaserJet 4600 printer to retrieve a web page, that I then scrape to pick out the values of the various consumables it has (CMYK cartridges and other kits). The fact that it uses http is incidental. If HP bothered to supply a half-decent MIB, SNMP would be a good alternative. Anyway, I now have to deal with other HP models, and Ricoh printer/copiers as well. And I haven't a clue what namespace to use. Your advice is much appreciated. Thanks, David
Re: Compress::Bzip2 patch, can't reach author
Lincoln A. Baxter wrote: On Sat, 2004-12-11 at 08:16 +0100, David Landgren wrote: David Robins wrote: I've been sitting on a patch for Compress::Bzip2 for a while; I sent it to the maintainer (Marco Carnut, http://search.cpan.org/~kcarnut/) but he didn't reply. The patch: - fixes a bug with compressing small strings (the allocated buffer is too small) - adds error reporting and checking - adds tests - adds an OO streaming interface - adds a 'version' method to get the bzip2 library version - cleans up the documentation - looks for libbz2, rather than hard-coding the location I can send the patch to this list if desired (it's about 9k gzipped), or go ahead and upload a new version to CPAN, although I don't want to tread on anyone's toes. If Marco can't be found I'd be willing to take over maintainership. I was in the same position about two years ago. Never heard anything back. I would recommend you take over maintenance of the module, I think any toes to tread on have long since moved away. http://cpan.org/misc/cpan-faq.html#How_maintain_module It would seem like the requirements have be met to hand over maintenance of this module to a new maintainer. If David's patch file has as much new functionality and fixes as described, and the author has really been absent for close to two years, I think it is time to ask for it. It's been a while, I'd have to dig around to find the patch. In any event I'm quite certain it wasn't as sophisticated as David... oh hang on, you're referring the other David. In any case, I'll cast a vote for someone, anyone, breathing life into C::B. David
Re: Compress::Bzip2 patch, can't reach author
David Robins wrote: I've been sitting on a patch for Compress::Bzip2 for a while; I sent it to the maintainer (Marco Carnut, http://search.cpan.org/~kcarnut/) but he didn't reply. The patch: - fixes a bug with compressing small strings (the allocated buffer is too small) - adds error reporting and checking - adds tests - adds an OO streaming interface - adds a 'version' method to get the bzip2 library version - cleans up the documentation - looks for libbz2, rather than hard-coding the location I can send the patch to this list if desired (it's about 9k gzipped), or go ahead and upload a new version to CPAN, although I don't want to tread on anyone's toes. If Marco can't be found I'd be willing to take over maintainership. I was in the same position about two years ago. Never heard anything back. I would recommend you take over maintenance of the module, I think any toes to tread on have long since moved away. David
Re: 'make test' email report from cpanplus bounced becuase perl.org requires valid sender domain
Adam Monsen wrote: I'm unable to send in test reports via cpanplus because the test email sent by Mail::Send doesn't have a valid sender domain. How might I set this? Example: - The following addresses had permanent fatal errors - [EMAIL PROTECTED] (reason: 550 [PERMFAIL] perl.org requires valid sender domain) [...] Here are the headers for the sent report: Return-Path: [EMAIL PROTECTED] Received: from localhost.localdomain (exodus [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id i7PHZsj5012172 for [EMAIL PROTECTED]; Wed, 25 Aug 2004 10:35:54 -0700 Received: (from [EMAIL PROTECTED]) by localhost.localdomain (8.12.10/8.12.10/Submit) id i7PHZs1h012170; Your DNS is not set up correctly. Your machine has a hostname of exodus, but the machine doesn't know to which domain it belong. You might merely have to change /etc/hosts and your MTA will pick it up (after a restart). Otherwise you may have to name it explicitly your MTA config. If you don't have a domain, you will have to forward your traffic through your ISP's outbound MXes (probably something like smtp.example.com). This is configured in your MTA. David
Re: [Module::Build] requires_one_of
Ken Williams wrote: [...] Regarding the concept-formerly-known-as virtual packages, I think I'd like them to tie into the features concept more. I think perhaps it's time to write that boolean requirement specification stuff, and then we can use that both in the normal requirement specs and the requirement specs for a declared feature. To me, features are something that the module being installed offers, rather than the thing the module requires in order to achieve its job. With that in mind, if you take the following, and s/features/needs/ I think it becomes eminently self-describing. The idea would look something like this: in the Build.PL -- features = { # Old-style requirement spec 'yaml_support' = { description = Can read write YAML files, requires = { 'YAML' = 0.13 }, recommends = { 'YAML' = 0.49 }, }, # New-style requirement mini-language spec 'dbi_support' = { description = Can read write databases, requires = q{ DBI = 1.0 , (DBD::mysql = 1.5 || DBD::Postgres) }, }, [...] David
New module: Regexp::Trie
Hello, I gave a talk at the French Perl Workshop in June about some work I was doing to produce really large (i.e. length($re) 5) regular expressions for Postfix access maps. (Postfix can be compiled with the PCRE library). A number of people expressed interest in the approach and wondered if and when it would be available as a module on CPAN. The idea is that sometimes you have a large set of regular expressions (e.g. 2000), and you want to test whether a string matches any of them. You don't particularly care *which* expression matches, the fact that one matches is sufficient. Brute forcing it with a loop is not very efficient. Concatenating them with | is not efficient either, if a large subset of the expressions share a common prefix. I know about Jarkko's Regex::PreSuf and another module whose name escapes me this instant, but they both suffer from the limitation of not being metacharacter-aware. For instance: use Regex::PreSuf; print presuf(qw(a\d+foo a\D+123)); produces: a\\(?:D\+123|d\+foo) The module I'm developing works with variable length tokens, and thus deals with the above correctly: use Regexp::Trie; my $rt = Regexp::Trie-new; $rt-add( qw/a \\d+ f o o/ ); $rt-add( qw/a \\D+ 1 2 3/ ); print $rt-re; produces: a(?:\D+123|\d+foo) (modulo me getting the backslashes escaped correctly here -- the algorithm does the right thing). The above example contains (IMO) too much make-work code, so I'm planning on distributing a number of helper packages as well, which will take care of the general cases. I'm thinking of something like my $rt = Regexp::Trie-new( Regexp::Trie::Lex::simple(qw( a\\d+foo a \\D+123 )) ); print $rt-re; I.e., the Regexp::Trie::Lex::* namespace, whose packages simply have to return an object that contains an 'add' method. The Regexp::Trie::new constructor will simply take the returned object and call its 'add' method until exhaustion, and fill up its own internal structure. As another example, I have a set of regexps that should never contain a bare . (dot) metachar. To do so is an error. Writing a seperate lexer package for this allows such error-checking to take place. I spoke with Nicholas Clark about the item in the latest perltodo, specifically: quote =head2 common suffices/prefices in regexps (trie optimization) Currently, the user has to optimize Cfoo|far and Cfoo|goo into Cf(?:oo|ar) and C[fg]oo by hand; this could be done automatically. /quote This is apparently a non-trivial undertaking to do in core and he suggested I pursue the release of this module regardless (I'm targetting 5.005_03 as a baseline anyway). If I haven't put you to sleep by now, I have the following questions: 1. Has this been done before (i.e. shoot me now and put me out of my misery). 2. Is Regexp::Trie a good name? (I fall into the regexp is spelt with a p camp, but if Regex is preferred that's fine by me. I can never remember which, if either, is deprecated). 3. Is the lexer namespace a good idea? Or is there a better way do to this? I'm open to any design suggestions on this issue since nothing is written yet. Thanks for reading this far, David Landgren
Re: New module: Regexp::Trie
Randy W. Sims wrote: [...] 3. Is the lexer namespace a good idea? Or is there a better way do to this? I'm open to any design suggestions on this issue since nothing is written yet. What about Japhy's new Regexp::Parser ? Hmm. Yes, I've know about it, and even downloaded it to play with it this weekend. But wrote tests instead :) I'm not sure how fine-grained it is, and/or how much fine-grainedness I need. For instance, given '(?:foo|bar| (?:cat|dog))', I don't care about isolating the (?:cat|dog) part. It's up to you to feed it the tokens at the granularity you want to deal with. Thanks for the pointer. David