things are getting our of hand here. people are cutting and pasting sizeable portions of code. code is in snippets, meditations.... some people want a golf section. CODE tags containing useful fragments are everywhere. manythings which could/should be on CPAN arent there. Some thoughts:

  • Create a well-defined relation to the CPAN and the Perl scripts archive. If you don't then we are implicitly saying that either they are not good enough or that centralization of needed software resources is a bad idea. Now I know that the well-meaning people here (myself included) don't think that, but we are spitting in their face and at the same time we are becoming another unrelated hard-to-search Perl code repository.
  • Find somewhere to upload this code in zip format. Document your code with pod
  • Make the code searchable
  • Listen closely to what Elaine Ashton has to say about CPAN and decide how Perlmonks' code bodies should relate to what she talks about.
    • Comment on this place should define a relation to CPAN soon
  • Replies are listed 'Best First'.
    Re (tilly) 1: this place should define a relation to CPAN soon
    by tilly (Archbishop) on Jul 15, 2001 at 21:12 UTC
      Why do we need a defined relation?

      Personally PerlMonks is a place to try code out, get feedback, and then revise it. CPAN is a place to put code that I think will be more useful which I am also willing to support. Where there is overlap, I will post code here first for discussion and also upload to CPAN. If I do that, I want people to install from CPAN. The version that is here will not be maintained. Conversely most of what I post here will never go on CPAN. Why not? Well first of all it is more work for me to get it CPAN ready, secondly it isn't modularized in a way that I think makes it useful on CPAN, and thirdly for one reason or another I am not willing to support it.

      Now I am not against the centralization of software archives, for good software. However I also think that random repositories are only as good as the people feeding then. There is no magic that makes a would-be CPAN author any better than Matt Wright. Indeed I think he is more competent than some who have CPAN accounts. But I don't think that there is any value in throwing every piece of good software onto CPAN for public enjoyment. Or even in throwing every useful piece of software up there for public enjoyment.

      If you disagree then I suggest putting Matt Wright's Script Archives on CPAN, in their entirety. After all that is code with a demonstrated utility to the general public.

      As for what Elaine Ashton has to say, links please. After I read it, I will give an opinion on what I think.

    Re: this place should define a relation to CPAN soon
    by bikeNomad (Priest) on Jul 15, 2001 at 20:55 UTC
      I agree that good code here is unavailable to the masses, and should probably be on CPAN. However, putting things on CPAN carries a heavier maintenance responsibility than leaving it here. We can post code here and have a discussion about it (and not have to provide support ourselves if we don't want to); you don't really have that option with CPAN if you're behaving responsibly.

      The lack of a way to search the Code and Snippets sections with Super Search makes PM a less useful place to go find code than CPAN, which has good search tools.

      My own relation between PerlMonks and CPAN is this: I sometimes try out new ideas here to get feedback (like Object-Oriented programming without classes!), and then, if they're interesting enough (and they're modules), I might make them a part of CPAN (watch for Class::Prototyped, coming soon)

      As far as scripts, like Perl tags generator using the Debugger, I wouldn't know what to do with them. I don't think I've ever used the Perl scripts archive. I just looked at it, though, and it's missing some obvious categories like Programming Tools (of course, PerlMonks is also missing that one). (not that both places couldn't add categories, of course).

      What does Elaine Ashton have to say about CPAN? Can you give a link?

      Why use zip format? Not that I have anything against zip (I did write Archive::Zip, after all), but it's pretty evident that .tar.gz files are the standard mode of CPAN distribution. If you upload both a .zip and .tar.gz file to CPAN, it can confuse it (I've made this mistake). And most Windows users can handle such files with WinZip or GNU tools.

    Re: this place should define a relation to CPAN soon
    by rchiav (Deacon) on Jul 16, 2001 at 00:21 UTC
      I think I might be missing something here, because I've never used this site to look for canned modules or other pieces of code. What I've used it for, and what I thought the purpose of the site is, is to help me (and everyone else) write better code.

      Yes, there are a lot of gifted individuals here. And most, if not all of those that I'd consider to be gifted have published CPAN modules. And those that are writing code that's worth while and posting it to this site are well aware of CPAN, and it's completely their choice as to whether or not they submit it there.

      The code posted here, I've either found enlightening or down right amazing. Now if I want something to do the dirty work for me, I'll go search CPAN. It would have never crossed my mind to search perlmonks to find a module.

      All that being said, it would be nice if things like Cool Uses for Perl, Snippets, and Craft had some sort of tree structure that was browseable. Not in an attempt to become another CPAN, but to make finding help on how to solve a problem easier.

      For example, If I was looking for some help on NT domain management, beeing able to easily find that code would be helpful. Yes, there's search and Super Search, but that's not going to catch everything... and maybe not the node you needed most.

      The downside is time. Someone would have to manage and maintain this to keep it clean, or there would be no purpose in doing it.


        I've hesitated posting here since I've recently made an ass of myself, but here 'ya go ...

        I think that two valid points have been brought up in this thread. The first is that code posted to CPAN should be of a specific quality. As HyperZonk said, at best our is of "Beta" quality. This, to my mind, is not appropriate material to be posted to CPAN. There is some really good code here, but I wouldn't want the responsibility of having my own code that I post here be available for public consumption as with CPAN.

        The implicit sense of responsilibity that comes from authoring something that's available for download might in fact cause a decrease in the amount of snippets that are available here. A person (me, for example ... though in my case this might be a good thing) might think twice about posting something if that code were instantly availible by the amount of people who hit download sites like CPAN. Like I said, those people are expecting a certain code-quality that isn't implied here.

        The second point relates to the first: we need a mechanism that is relatively nonobtrusive; something not too different from the format we have now; what people are used to. If an extra burden is placed on people for formatting, pod'ing, whatever, it won't be a smooth or easy transition; and many just won't do it.

        What we really need, I think, is some intelligent node-crawlers; a new SuperSuperSearch that is specifically designed to trawl though nodes looking for <code> tags, and the stuff between them.

        Some of the best code around here are snippets, things like Japhy's response to a post of mine

        sub union { my %seen; @seen{@$_} = () for @_; return keys %seen; } sub intersection { my %seen; for (@_) { $seen{$_}++ for @$_ } return grep $seen{$_} == @_, keys %seen; }

        This is the type of code that we should be concerned about being found. Unfortunately to do that, we need to come up with a method of cataloging and searching the code.

        Something we can start easily enough with is to catalog by function name. That combined with a full-text search of the node (and possibly the entire thread) should turn up quite a few hits; especially since most people give their example subs logical and descriptive names (like, ahem, Japhy's above-quoted example). Adding the ability to search in ## Comments for text seperately than function name searching would be a really good method, I think.

        So, what I'm saying is that we should think not off adding an outside (CPAN) method of accessing our code, but instead create a local method of searching it.

        And after all, isn't that the True Way of a Monestary? Isn't there some sort of implied rule that you must be willing to look for the answer before receiving it? I've never known Librarian-monks to ask for outside help in cateloging their books :)

        mr.nick ...

    Re: this place should define a relation to CPAN soon
    by HyperZonk (Friar) on Jul 15, 2001 at 23:49 UTC
      Update: In discussing this with crazyinsomniac and toma, I came to see the errors of my ways. :) People on perlmonks shouldn't have their code transferred to CPAN at someone else's decision. If one wants his or her code to be available in that central repository, one can upload to CPAN. Perhaps it would be better not to create a structure for doing so. If, on the other hand, the majority opinion is otherwise, I think that in addition to the points I made below, the original author of the code should have a say in whether or not the code is shared on CPAN.

      Original message:
      princepawn makes some valid points, as does everybody in this thread, particularly tilly in this reply. I think that one of the important word's in princepawn's original is "relationship," though.

      Perhaps if perlmonks is willing to do some work to create this relationship, CPAN would be willing to unbend enough to create a special category for perlmonks' code. That is, an area in which it is understood that:
      • The available code is, at best, beta quality.
      • Documentation may be minimal or non-existent.
      • The code is neither supported nor maintained.
      Our end of the bargain might be to create a special group of code reviewers whose specific task is to review code posted to perlmonks, and decide which pieces are of such substantive nature that they should be included in CPAN::perlmonks (or whatever). Included in such a task might be editing of code to include later suggestions and fixes from the thread in which the code was originally posted. The detail of that process can be worked out by consensus (ie, how many reviewers, how many votes from same required to move to CPAN, process for amending the code, etc.).

      Of course, the main barrier to this is that adding such a review process will be a burden on vroom, but those who think that a relationship with CPAN will be useful should, IMO, be willing to help with implementing this.
    Re: this place should define a relation to CPAN soon
    by adamsj (Hermit) on Jul 15, 2001 at 20:01 UTC
      This is a good topic for discussion, on which I have very little to contribute. Two points:

      • Just because I think you've overstated the case doesn't mean I don't think there's something to what you say.
      • I agree whole-heartedly with "Listen closely to what Elaine Ashton has to say about CPAN".
      They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen
    Re: this place should define a relation to CPAN soon
    by princepawn (Parson) on Jul 15, 2001 at 21:30 UTC
      As for what Elaine Ashton has to say, links please. After I read it, I will give an opinion on what I think.
      Here you go.
        I already knew that she had that opinion. I thought that you were referring to something else when you brought it up. Perhaps you can explain how her thinking that people shouldn't bitch and moan about CPAN translates into thinking that tons of the code that appears here should go onto CPAN?

        Do you really think that PerlMonks is taking anything away from CPAN? I don't. I see CPAN constantly recommended here. I see explicit instructions given for how to install things from CPAN. I see people being encouraged to get involved with CPAN. I see people getting feedback on things that are going into CPAN, feedback which improves the quality of that code.

    (ichimunki) re: this place should define a relation to CPAN soon
    by ichimunki (Priest) on Jul 16, 2001 at 19:13 UTC
      Who the heck is Elaine Ashton? And why are you asking me to listen closely to her without providing a single link to something she has said that relates to the topic at hand?

      As for a formal relationship to CPAN, I think supporting a CPAN link tag and the CPAN search nodelet are enough. The code here is different from the code at CPAN-- and I'm sorry if you think that's somehow denigrating to either PM or CPAN, but it's not. I mean, this is a non-issue or someone would be spouting off about it in c.l.p.* (or have they and I didn't notice?). And yes, centralization of resources is a bad thing. Especially when the resources don't have that much in common. Sure they're both in Perl, but the scripts here are usually what I would consider application space (designed to be used by users) and exemplary code (designed to be learned from, not necessarily used as is) and CPAN is what I would consider perl space (code designed to extend perl for the programmer).