Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Credit where it is due

by Albannach (Monsignor)
on Nov 15, 2000 at 09:43 UTC ( #41724=monkdiscuss: print w/replies, xml ) Need Help??

A quickie idea here: Every time I use the "d/l code" link, I manually paste in a comment copied from the original page giving the node title, poster's ID, date and time, such as:
# New Road Traffic Reports by orthanc on Tue Nov 14 2000 at 09:32 on PerlMonksDo you think this would be worth automating?

Replies are listed 'Best First'.
RE: Credit where it is due
by BastardOperator (Monk) on Nov 15, 2000 at 22:40 UTC
    Why not use pod format??

    =head1 AUTHOR orthanc =head1 DATE Tue Nov 14 2000 09:32 =head1 DESCRIPTION New Road Traffic Reports =cut
    That could be easily automated, embedded in the script (anywhere) and viewed easily.
RE: Credit where it is due
by extremely (Priest) on Nov 15, 2000 at 11:54 UTC
    I ++'ed this but I have to ask, where do you put the comment? At the end (__DATA__ oops), at the beginning, (before or after #!/usr/bin/perl, what if there is no #! line?) what if the script has been line_numbered?

    I hate throwing wrenches into plans I like but I have no idea how I'd do it...

    $you = new YOU;
    honk() if $you->love(perl)

      I think it's a question of format.
      The first line you cant use :-), so write a comment into the second line of your code in the node. That means, when downloading code, your script has to parse the second line for the options "numbered=yes" or "no" and or any other things, so your little script will know if to strip line numbers or to mask them within comments. The authors information your script could include then anywhere within the file just using POD's author information and copyright notice, and if you want your script could even include the whole description from the original node within that POD.
      Well, once more thinking about that, yes, I think perlmonks could generate such a file for you when you download the code. So you don't have to parse :-) but get a script with a nice "small(?)" POD, eh?
      well perl can ..

      Have a nice day
      All decision is left to your taste
      Update :
      As perlmonks (or better to say Everything) uses XML why not to support tags when you post your script such as
      <info> <author> <name>blah</name> <email></email> <funnythings>for my mom's pride</funnythings> </author> <more> </more> </info>
      just before or after the code or just somehow else
RE: Credit where it is due
by fundflow (Chaplain) on Nov 15, 2000 at 19:40 UTC
    The simplest thing will be to encode the info in the file name.

    Maybe something like '' instead of the default ''

    This doesn't change the script (and thus avoids the problems extremely pointed out) and gives most of the information needed: Credit to the author and a pointer for furher info.

RE: Credit where it is due
by jptxs (Curate) on Nov 15, 2000 at 09:46 UTC

    out of votes for now, but I'd like to second that notion.

    <myExperience> $mostLanguages = 'Designed for engineers by engineers.'; $perl = 'Designed for people who speak by a linguist.'; </myExperience>
RE: Credit where it is due
by neophyte (Curate) on Nov 15, 2000 at 13:36 UTC
    Definitely a good idea, up to now I also add a comment manually.


RE: Credit where it is due
by Albannach (Monsignor) on Nov 15, 2000 at 23:47 UTC
    Many will notice that I was clever enough not to suggest how this might be done. Having looked over the comments, I agree that POD or some other standard would be great, however these ideas would all rely on the person entering the code to do work, and so far few do so. Perhaps they feel that since it is posted under their name they don't need further identification.

    Ideally I'd still like a simple one line comment as I suggested originally, which would either be the first line or follow the #! line if it exists. This would ensure that all downloaded code would have at least minimal identification (sufficient to track down additional info). If not, then fundflow's idea is a good alternative. Since the Monastery already has this information, why rely on lazy humans? ;-)

    Update: In keeping with my theme of giving credit, my apologies to BastardOperator for not reading to the end of his node above where he already mentioned automation. I blame society for my short attention span!

      Actually, my thought, when suggesting pod format was that it would be automated ala vroom. Maybe when you hit the "d/l code" link, it inserts that pod text, getting the name of the person who submitted it, the date it was submitted, and the description, and appending that to the top or bottom of the page ( plus or minus #!/sha/bangs or __END__ or __DATA__), but anywho...
RE: Credit where it is due
by ImpalaSS (Monk) on Nov 15, 2000 at 19:31 UTC
    Yep, I agree. That is a really great idea, i also copy paste the author of any script that i use :)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://41724]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2023-03-28 11:28 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (67 votes). Check out past polls.