[32433] in Perl-Users-Digest
Perl-Users Digest, Issue: 3700 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 25 18:09:26 2012
Date: Fri, 25 May 2012 15:09:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 25 May 2012 Volume: 11 Number: 3700
Today's topics:
coding question rvaedex23@gmail.com
Re: coding question <jl_post@hotmail.com>
confused about POD <cartercc@gmail.com>
Re: confused about POD <bugbear@trim_papermule.co.uk_trim>
Re: confused about POD <cartercc@gmail.com>
Re: confused about POD <jimsgibson@gmail.com>
Re: confused about POD <brian.helterline@hp.com>
Re: confused about POD <cartercc@gmail.com>
Re: confused about POD <hjp-usenet2@hjp.at>
Re: confused about POD <jl_post@hotmail.com>
Re: confused about POD <cartercc@gmail.com>
Re: get local packages symbols with require <rvtol+usenet@xs4all.nl>
Re: get local packages symbols with require <rweikusat@mssgmbh.com>
Re: Help with install from CPAN <dave@invalid.invalid>
Re: Help with install from CPAN (Seymour J.)
Re: Help with install from CPAN <dave@invalid.invalid>
Re: Help with install from CPAN (Seymour J.)
How does a script language work in a server <John.Smith@invalid.com>
Re: How does a script language work in a server jaialai.technology@gmail.com
Re: How does a script language work in a server <cartercc@gmail.com>
Re: OT: How to calculate reputation scores? <mikee@mac.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 25 May 2012 13:08:18 -0700 (PDT)
From: rvaedex23@gmail.com
Subject: coding question
Message-Id: <634c71ba-2329-44fc-9ccb-a4f86ba7338d@googlegroups.com>
I am not very familiar with perl. Although, I do have shell scripting experience.
I thought this would be easier to do this in perl.
I have a file that doesn't have a field delimiter between the columns and I want to add a colon between each column. I can identify the columns by hard coding the range:
such as "col1 to col 10" "col11 to col24" etc...
I am stuck. Any advise would help. Thanks.
------------------------------
Date: Fri, 25 May 2012 13:52:05 -0700 (PDT)
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: coding question
Message-Id: <2070c97e-fdd9-4715-9e47-9b300e5cf98e@s9g2000vbg.googlegroups.com>
On May 25, 2:08=A0pm, rvaede...@gmail.com wrote:
> I thought this would be easier to do this in perl.
>
> I have a file that doesn't have a field delimiter between the columns and=
I want to add a colon between each column. =A0I can identify the columns b=
y hard coding the range:
> such as "col1 to col 10" "col11 to col24" etc...
>
> I am stuck. =A0Any advise would help. =A0Thanks.
If the column ranges are guaranteed to be the same, you can do
something like:
my @fields =3D unpack("a10 a14", $line);
to extract out the fields in each column. Then you can re-print them
with colons in between them like this:
print join(':', @fields);
Here's a quick one-line solution. If you have a file (named
"input.txt") with these two lines:
1234567890abcdefghijklmn
happy day
Then running this one-liner:
# For Unix:
perl -wlne 'print join(":", unpack("a10 a14", $_))' input.txt
# For Windows/DOS:
perl -wlne "print join(':', unpack('a10 a14', $_))" input.txt
will get you this output:
1234567890:abcdefghijklmn
happy :day
Note that trailing spaces aren't stripped (you can see an example
of this this in the second line of output). If you want them to be
stripped, replace "a10 a14" with "A10 A14". Then your output will
look like:
1234567890:abcdefghijklmn
happy:day
You can look up the documentation for join() with "perldoc -f
join". You can read the documentation for unpack() with "perldoc -f
unpack". You can look up the letter templates (such as "a" and "A"
that you pass into unpack()) with "perldoc -f pack".
I hope this helps!
-- Jean-Luc
------------------------------
Date: Fri, 25 May 2012 07:47:29 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: confused about POD
Message-Id: <c4892d56-c14e-4551-8484-3035bbfec1d8@d18g2000yqc.googlegroups.com>
This might be just a mental glitch, but I seem to be having a problem
wrapping my mind around POD. My mental image is javadoc, which allows
me to produce HTML documentation of Java classes from internal
documation (in Javadoc format) by running a command.
If I document my Perl code (either an executable or a PM) using POD
formatted text, what command do I run to produce a series of HTML
pages?
What I want to do is pass a source listing (such as some_script.plx,
or SOMEPM.pm or <some_perl_dir>) to a utility and have it output HTML
files.
Thanks, CC.
------------------------------
Date: Fri, 25 May 2012 16:17:11 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: confused about POD
Message-Id: <0_mdncWajMfqPyLSnZ2dnUVZ8kSdnZ2d@brightview.co.uk>
ccc31807 wrote:
> This might be just a mental glitch, but I seem to be having a problem
> wrapping my mind around POD. My mental image is javadoc, which allows
> me to produce HTML documentation of Java classes from internal
> documation (in Javadoc format) by running a command.
>
> If I document my Perl code (either an executable or a PM) using POD
> formatted text, what command do I run to produce a series of HTML
> pages?
>
> What I want to do is pass a source listing (such as some_script.plx,
> or SOMEPM.pm or<some_perl_dir>) to a utility and have it output HTML
> files.
http://lmgtfy.com/?q=POD+html
BugBear
------------------------------
Date: Fri, 25 May 2012 08:26:09 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: confused about POD
Message-Id: <9e847891-17d3-4223-86db-a343b6e26cbe@i19g2000yqn.googlegroups.com>
On May 25, 11:17=A0am, bugbear <bugbear@trim_papermule.co.uk_trim>
wrote:
> http://lmgtfy.com/?q=3DPOD+html
Yeah. I tried that. This isn't the same as the javadoc command.
I can write a (small) perl script that takes a file or a list of files
as input, and produces an html file for each input, plus an index.html
that hyper links all of them. However, I'd have to spend several days
to get it right. It seems to me that this is something that someone
else might have written, but I can't seem to find it.
Maybe I'm unique in that this is the first time that someone has
thought of this. I think not ... which is why I'm confused.
Thanks, CC.
------------------------------
Date: Fri, 25 May 2012 09:51:47 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: confused about POD
Message-Id: <250520120951471693%jimsgibson@gmail.com>
In article
<9e847891-17d3-4223-86db-a343b6e26cbe@i19g2000yqn.googlegroups.com>,
ccc31807 <cartercc@gmail.com> wrote:
> On May 25, 11:17 am, bugbear <bugbear@trim_papermule.co.uk_trim>
> wrote:
> > http://lmgtfy.com/?q=POD+html
>
> Yeah. I tried that. This isn't the same as the javadoc command.
>
> I can write a (small) perl script that takes a file or a list of files
> as input, and produces an html file for each input, plus an index.html
> that hyper links all of them. However, I'd have to spend several days
> to get it right. It seems to me that this is something that someone
> else might have written, but I can't seem to find it.
>
> Maybe I'm unique in that this is the first time that someone has
> thought of this. I think not ... which is why I'm confused.
Have you looked on CPAN for POD-processing modules? You will get lots
of hits. (I haven't tried any of them). So, no, you are not the first
person who has tried this.
perldoc is not the same as javadoc. javadoc will scan the Java source
and extract information from Java methods and annotations. perldoc
scans the Perl code and extracts information from between POD tags that
is independent of the code.
--
Jim Gibson
------------------------------
Date: Fri, 25 May 2012 10:19:09 -0700
From: Brian Helterline <brian.helterline@hp.com>
Subject: Re: confused about POD
Message-Id: <jpoetg$onu$1@usenet01.boi.hp.com>
On 5/25/2012 7:47 AM, ccc31807 wrote:
> If I document my Perl code (either an executable or a PM) using POD
> formatted text, what command do I run to produce a series of HTML
> pages?
>
> What I want to do is pass a source listing (such as some_script.plx,
> or SOMEPM.pm or<some_perl_dir>) to a utility and have it output HTML
> files.
For ActivePerl on Windows, when you use their PPM tool to install
modules, it grabs the module, installs it and generates HTML on the fly
to add into index.html. You could take a peak into that code to see how
they do it. I am pretty sure it is all perl.
-brian
------------------------------
Date: Fri, 25 May 2012 12:09:44 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: confused about POD
Message-Id: <94dd9c39-bd4c-456b-970c-285818e0bc3e@f14g2000yqe.googlegroups.com>
On May 25, 1:19=A0pm, Brian Helterline <brian.helterl...@hp.com> wrote:
> For ActivePerl on Windows, when you use their PPM tool to install
> modules, it grabs the module, installs it and generates HTML on the fly
> to add into index.html. =A0You could take a peak into that code to see ho=
w
> they do it. I am pretty sure it is all perl.
Yeah, same idea but with the code I write. We lost a programmer who
left eight years of code and ZERO documentation (not Perl code).
Guess what the latest initiative of management is right about now!
I never minded writing javadoc comments, and I don't mind writing perl
comments in POD format. I /do/ mind jumping through hoops to generate
HTML pages.
I use Strawberry (on M$), but looking at ActvePerl is a good idea.
Thanks.
CC.
------------------------------
Date: Fri, 25 May 2012 22:03:56 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: confused about POD
Message-Id: <slrnjrvpdc.sbq.hjp-usenet2@hrunkner.hjp.at>
On 2012-05-25 15:26, ccc31807 <cartercc@gmail.com> wrote:
> On May 25, 11:17 am, bugbear <bugbear@trim_papermule.co.uk_trim>
> wrote:
>> http://lmgtfy.com/?q=POD+html
>
> Yeah. I tried that. This isn't the same as the javadoc command.
>
> I can write a (small) perl script that takes a file or a list of files
> as input, and produces an html file for each input, plus an index.html
> that hyper links all of them. However, I'd have to spend several days
> to get it right. It seems to me that this is something that someone
> else might have written, but I can't seem to find it.
Well, the obvious script "that someone else might have written" is of
course pod2html. Maybe you should start by explaining why that isn't
adequate for your needs (I can think of a couple of reasons, but my
reasons are probably not the same as your reasons).
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: Fri, 25 May 2012 14:26:38 -0700 (PDT)
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: confused about POD
Message-Id: <8652448c-3a24-4edb-97c0-0075bd7cbb94@e20g2000vbm.googlegroups.com>
On May 25, 8:47=A0am, ccc31807 <carte...@gmail.com> wrote:
>
> If I document my Perl code (either an executable or a PM) using POD
> formatted text, what command do I run to produce a series of HTML
> pages?
You can use "pd2html" to accomplish that. For example, let's say
you want to read the perldocs for the Math::BigInt module. You can
read them straight up with the command:
perldoc Math::BigInt
but if you'd rather read them with a web browser, you can use
"pod2html" like this:
pod2html Math::BigInt > math_bigint_documentation.html
then open the file "math_bigint_documentation.html" in your favorite
web browser, and enjoy!
There are more formats you can read the perldocs in. For example,
if you prefer to read a LaTeX-formatted documentation, you can create
one with the command:
pod2latex Math::BigInt > latex_file
Incidentally, I can't always remember the proper formatting codes
to use, and instead of looking them up with "perldoc perlpod",
sometimes I prefer to pick apart an already written POD and learn by
example. (If you haven't figured it out by now, I often use the
Math::BigInt module to see how some POD formatting was done.)
If I want to see how some formatting was done in the Math::BigInt
module, I type:
perldoc -l Math::BigInt
(that's the letter "ell", not the number 1)
That shows me where the module's file is literally located, then I can
read it with any text viewer/editor I have available.
I can also skip a step just by typing:
perldoc -m Math::BigInt
and then I'll be immediately shown the module file's exact contents
(code, POD, and all).
I hope this helps!
-- Jean-Luc
------------------------------
Date: Fri, 25 May 2012 14:41:51 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: confused about POD
Message-Id: <6b4ac723-2a48-4c48-9996-ac90ca2e818d@d33g2000yqa.googlegroups.com>
On May 25, 4:03=A0pm, "Peter J. Holzer" <hjp-usen...@hjp.at> wrote:
> Well, the obvious script "that someone else might have written" is of
> course pod2html. Maybe you should start by explaining why that isn't
> adequate for your needs (I can think of a couple of reasons, but my
> reasons are probably not the same as your reasons).
The simple answer is that it doesn't do what I want it to.
For example, suppose I have the directory listing shown below because
it's rather lengthy.
Further suppose I run the following command at the command prompt,
> generate_html_from_embedded_pod_in_perl_source_files *.pm *.plx *.cgi
expecting it to generate a sub-directory (perhaps called
'documentation') with the following files:
- index.html
- CCC_LOCATIONS.html
- console.html
- SQL.html
- etc.
I want a separate html file for every perl source file. I want the
index.html to list and link to each html file and each html file to
extract all the POD embedded in each plx, pm, or cgi file. pod2html
doesn't do this.
If nothing does this, it's okay. With a little effort I can write a
clunky something that does a minimal job. Obviously, I'd rather use
something the has been written and tested by someone who knows what
they are doing better than I do.
Thanks, CC.
04/25/2012 03:41 PM 152,319 ACAD_PROGS.pm
04/25/2012 10:01 AM 19,985 CAS.csv
04/26/2012 02:09 PM 14,618 cas_courses.csv
04/30/2012 01:49 PM 31,020 cas_courses.sql
04/25/2012 01:04 PM 3,656 CCC_LOCATIONS.plx
04/25/2012 10:00 AM 17,685 COE.csv
05/07/2012 12:06 PM 1,761 console.cgi
05/07/2012 01:16 PM 14,195 courses.cgi
05/07/2012 01:17 PM 329 courses_20120507.csv
04/26/2012 03:09 PM 3,369 coursetest.sql
05/07/2012 01:42 PM 1,635 database_schedules.plx
04/25/2012 03:25 PM 342 database_schema.txt
04/26/2012 09:07 AM 25,491 fac.csv
04/30/2012 05:07 PM 5,174 faculty.cgi
04/30/2012 04:13 PM 70,568 faculty.sql
04/30/2012 04:04 PM 10,916 get_resource.cgi
05/07/2012 11:58 AM 3,234 HTML.pm
05/07/2012 12:07 PM 2,498 locations.cgi
04/25/2012 02:08 PM 3,554 locations.sql
05/04/2012 05:11 PM 660 print_csv.cgi
05/07/2012 12:05 PM 3,161 programs.cgi
04/25/2012 04:03 PM 198,723 programs.sql
05/04/2012 05:42 PM 1,532 question.plx
04/27/2012 11:12 AM 1,606 schedules.css
05/07/2012 12:08 PM 192,512 schedules.db
04/03/2012 09:55 AM 74,955 SER_FINAL_FAC.pm
05/01/2012 12:52 PM 3,069 SER_programs.plx
05/04/2012 10:25 AM 4,857 SER_programs.sql
05/07/2012 12:05 PM 4,245 SQL.pm
04/30/2012 10:49 AM 424 term.sql
05/07/2012 11:16 AM 2,345 terms.cgi
05/04/2012 10:36 AM 2,197 todo.plx
------------------------------
Date: Fri, 25 May 2012 18:18:58 +0200
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: get local packages symbols with require
Message-Id: <4fbfb0f2$0$6899$e4fe514c@news2.news.xs4all.nl>
On 2012-05-22 09:47, Marc Girod wrote:
> eval {
> local @INC = ($dir); # make %INC come out right
> eval "require $pkg";
> };
> warn $@, next if $@;
Don't test $@, but test the what the eval returns.
eval {
local @INC = ($dir); # make %INC come out right
eval "require $pkg";
1; # success
}
or do {
my $eval_error = $@ || 'Zombie Error';
warn $eval_error;
};
--
Ruud
------------------------------
Date: Fri, 25 May 2012 17:54:41 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: get local packages symbols with require
Message-Id: <87vcjkyze6.fsf@sapphire.mobileactivedefense.com>
"Dr.Ruud" <rvtol+usenet@xs4all.nl> writes:
> On 2012-05-22 09:47, Marc Girod wrote:
>
>> eval {
>> local @INC = ($dir); # make %INC come out right
>> eval "require $pkg";
>> };
>> warn $@, next if $@;
>
> Don't test $@, but test the what the eval returns.
This is a hack intended to work around destructors clearing or
changing $@ which happen to be executed automatically before the 'eval
scope' is left using a version of Perl older than 5.14, based on the
'ideological standpoint' that fixing broken code is Just Completely
Wrong[tm] and that one should always prefer adding bizarre
workarounds, ideally, even in places where the aren't needed, instead.
Anything else just makes the code too easy to understand and since "it
was hard to write, it should be hard to read" ...
------------------------------
Date: Fri, 25 May 2012 07:32:34 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: Help with install from CPAN
Message-Id: <fV45K0OBJxbE-pn2-1eC50O6ZDrsg@localhost>
On Mon, 21 May 2012 12:09:10 UTC, Shmuel (Seymour J.) Metz
<spamtrap@library.lspace.org.invalid> wrote:
> In <fV45K0OBJxbE-pn2-vlLdewbMVVxb@localhost>, on 05/21/2012
> at 10:07 AM, "Dave Saville" <dave@invalid.invalid> said:
>
> >Subject: Help with install from CPAN
>
> What happens if you download a package from CPAN manually and try
> installing it? What is your setup?
>
> You might try 5.10; That's what I'm currently running on eCS and I can
> install CPAN packages with it.
>
I installed 5.10 from Paul's site into root of a drive that also had
Paul's environment on it. Once again nothing works CPAN wise. Usually
"make test" runs no tests - they all come back "no subtests run". If
you try the tests individually they sometimes run OK, sometimes fail
and sometimes hang needing a CTRL-C.
On top of this I have the same problem as 5.8.2 in that the supplied
modules are too old to update. Choose a module, does not really matter
which, say A.
A won't install because it requires B.
B won't install because C is too low a level.
C won't install because A .......................
These are modules like Test* Module::Build etc. All you need to get up
tp date - except you can't. :-(
Doing a similar install of 5.14 yeilds the same mess - From a fresh
install I can't even install Astro::Sunrise which is working happily
on my 5.8.2 server from when it was installed on 5.8.0!
Now you see why I am still using 5.8.2. It might be old and
unsupported, but it actually works - as long as I don't need a new
module - which I do :-( This mess all started when I decided I needed
to be able to generate graphs on the fly for web pages.
--
Regards
Dave Saville
------------------------------
Date: Fri, 25 May 2012 08:30:39 -0400
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>
Subject: Re: Help with install from CPAN
Message-Id: <4fbf7b6f$3$fuzhry+tra$mr2ice@news.patriot.net>
In <fV45K0OBJxbE-pn2-1eC50O6ZDrsg@localhost>, on 05/25/2012
at 07:32 AM, "Dave Saville" <dave@invalid.invalid> said:
>I installed 5.10 from Paul's site into root of a drive that also had
>Paul's environment on it. Once again nothing works CPAN wise.
Have you tried manually downloading and untarring? I've not had the
problems you describe using that approach.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org
------------------------------
Date: Fri, 25 May 2012 19:39:04 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: Help with install from CPAN
Message-Id: <fV45K0OBJxbE-pn2-yl6Dq1XmSZdK@localhost>
On Fri, 25 May 2012 12:30:39 UTC, Shmuel (Seymour J.) Metz
<spamtrap@library.lspace.org.invalid> wrote:
> In <fV45K0OBJxbE-pn2-1eC50O6ZDrsg@localhost>, on 05/25/2012
> at 07:32 AM, "Dave Saville" <dave@invalid.invalid> said:
>
> >I installed 5.10 from Paul's site into root of a drive that also had
> >Paul's environment on it. Once again nothing works CPAN wise.
>
> Have you tried manually downloading and untarring? I've not had the
> problems you describe using that approach.
>
No because there are so many dependencies. Perhaps you have kept your
modules up to date?
--
Regards
Dave Saville
------------------------------
Date: Fri, 25 May 2012 16:03:30 -0400
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>
Subject: Re: Help with install from CPAN
Message-Id: <4fbfe592$13$fuzhry+tra$mr2ice@news.patriot.net>
In <fV45K0OBJxbE-pn2-yl6Dq1XmSZdK@localhost>, on 05/25/2012
at 07:39 PM, "Dave Saville" <dave@invalid.invalid> said:
>No because there are so many dependencies. Perhaps you have kept
>your modules up to date?
No, but when I need another module I download the most recent version
of everything it depends on. Since I'm doing that manually it's an
iterative process, but it's only about 3 dozen..
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org
------------------------------
Date: Fri, 25 May 2012 21:34:08 +0300
From: John <John.Smith@invalid.com>
Subject: How does a script language work in a server
Message-Id: <gpjvr7pc2bjv4dc4ps0hudmaafh77r0kv1@4ax.com>
When someone uses s browser and goes to a www.somesite.com/someperl.pl how does
it work at the server end? Let's say I'd like to create a "perl-clone" or
something like perl or php where would I get more info?
------------------------------
Date: Fri, 25 May 2012 15:23:44 -0400
From: jaialai.technology@gmail.com
Subject: Re: How does a script language work in a server
Message-Id: <4c215$4fbfdc46$813f0835$32691@news.eurofeeds.com>
On 5/25/12 2:34 PM, John wrote:
> When someone uses s browser and goes to a www.somesite.com/someperl.pl how does
> it work at the server end?
The web server will either return the raw contents of that page or, if
configured to do so, execute the file and instead return the output.
Again, this is a server specific configuration.
>Let's say I'd like to create a "perl-clone" or
> something like perl or php where would I get more info?
You'd like to design a new language? Jeez, kind of a big thing to do.
I'd start with the basics. Here is a free online book that I think is
really good and is very approachable if you already know Perl.
http://billhails.net/Book/
After you make it through that take what you learned and check out
some real life examples. There is no shortage of code for you to
go through in this area. Look at what Perl6, Jython, or PHP are
doing, for example.
------------------------------
Date: Fri, 25 May 2012 12:45:31 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: How does a script language work in a server
Message-Id: <8f82680d-b57e-43a3-b94d-303b1a94905a@j25g2000yqn.googlegroups.com>
On May 25, 2:34=A0pm, John <John.Sm...@invalid.com> wrote:
> When someone uses s browser and goes to awww.somesite.com/someperl.plhow =
does
> it work at the server end? Let's say I'd like to create a "perl-clone" or
> something like perl or php where would I get more info?
There are a number of ways this /could/ work, but the simplest case
perhaps is CGI. It works like this:
1. The client user accesses http://example.com/script.cgi
2. The client browser constructs an HTTP header and perhaps body
3. The package is sent over the wire to some web server
4. The web server receives the HTTP request and parses it
5. The web server decides that 'cgi' represents a call to a script,
and hands it off to a script, invoking the Perl executable, and sends
the appropriate parameters
6. The Perl executable executes the script, accepting the parameters
as input and returning the appropriate results as output. This usually
consists of HTML, but could consists of other things and usually
involves some other kinds of machinations behind the scenes, like
running some SQL against a database and munging the SQL results
7. The web server receives the return value from the script and sends
it back down the wire to the client browser
8. The client browser renders the HTML, or does some else (like show a
Flash movie or play a wav file)
CC.
------------------------------
Date: Fri, 25 May 2012 16:53:03 +0000 (UTC)
From: Mike <mikee@mac.com>
Subject: Re: OT: How to calculate reputation scores?
Message-Id: <jpoddf$hm3$2@dont-email.me>
On 2012-05-23, Adam Russell <ac.russell@live.com> wrote:
> On 5/22/12 12:54 PM, Mike wrote:
>> A general question, not PERL releated:
>>
>> Many web sites have an article/message/user reputation based on the up or
>> down votes the article/message/user receives. How is a reputation score
>> calculated given only up and down votes? (The user is not presented with
>> a 1 to 5 scale for scoring something.)
> Generally it is just a net score. The score is just incremented and
> decremented
> as each positive/negative vote is submitted. Some sites such as
> www.perlmonks.org (let's try to get this back On Topic! :) ) use a
> more elaborate algorithm though.
> http://www.perlmonks.net/?node=Voting%2FExperience%20System explains
> how perlmonks "Experience Points" are calculated.
> So, there really is no one way and you may want to build something sort
> of fun like perlmonks XP to help build a certain "community".
>
Thank you. I had looked at Perl Monks and not found this article.
Mike
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3700
***************************************