[30526] in Perl-Users-Digest
Perl-Users Digest, Issue: 1769 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 5 06:09:42 2008
Date: Tue, 5 Aug 2008 03:09:07 -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 Tue, 5 Aug 2008 Volume: 11 Number: 1769
Today's topics:
Re: bidding advice for a contract <brian.d.foy@gmail.com>
Re: bidding advice for a contract <vilain@NOspamcop.net>
Re: CLPM - a help group? <brian.d.foy@gmail.com>
Re: FAQ 4.36 How can I expand variables in text strings <brian.d.foy@gmail.com>
Re: FAQ 4.61 How can I always keep my hash sorted? <brian.d.foy@gmail.com>
Re: FAQ 4.61 How can I always keep my hash sorted? <brian.d.foy@gmail.com>
Re: FAQ 4.61 How can I always keep my hash sorted? xhoster@gmail.com
Re: highly restrictive sub-classing <brian.d.foy@gmail.com>
new CPAN modules on Tue Aug 5 2008 (Randal Schwartz)
Posting Guidelines for comp.lang.perl.misc ($Revision: tadmc@seesig.invalid
Re: Sort using reference to subroutine name? <heinvandenheuvel@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 05 Aug 2008 02:10:46 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: bidding advice for a contract
Message-Id: <050820080210467525%brian.d.foy@gmail.com>
In article
<be0f3724-5970-4288-81a0-94d62fc8a717@m44g2000hsc.googlegroups.com>,
cartercc <cartercc@gmail.com> wrote:
> They want a fixed price bid. (Did I mention that?)
Easy. Come up with a really big number that is worth your time for the
project period. Your fixed price is balanced by their fixed time frame.
You just have to figure out how much that period in your life is worth
to you.
When they don't meet their time frame, you start over with another
fixed price. :)
------------------------------
Date: Tue, 05 Aug 2008 00:47:25 -0700
From: Michael Vilain <vilain@NOspamcop.net>
Subject: Re: bidding advice for a contract
Message-Id: <vilain-9A122A.00472505082008@comcast.dca.giganews.com>
In article
<504bf20f-0af6-45a5-87c1-9752540b0e8a@e53g2000hsa.googlegroups.com>,
cartercc <cartercc@gmail.com> wrote:
> On Aug 4, 3:37 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> > > They want a fixed price bid. (Did I mention that?)
> >
> > Don't decide on a fixed price now.
>
> You and I both know that this is bidding on a pig in a poke, but they
> are used to giving fixed price bids and this is what they want. I have
> spent about two hours with them, and they are totally closed to the
> idea of paying by the hour or component.
>
> > Anyway, this kind of project will probably take quite a bit of time to
> > investigate before you can give a decent estimate. Get a
> > non-disclosure contract, sign it, give them a couple of hours of
> > investigation time. If it takes more than a day to figure out
> > (especially if the total project won't take more than a week or so)
> > make them pay for the rest of the time spent investigation.
> >
> > All of this is assuming they're actually trustworthy. Your description
> > sound fishy.
>
> This is a big player in a small but critical industry. There aren't
> many who build electronics to put into aircraft, missles, spacecraft,
> and bombs, which is why I don't want to mention names.
>
> We both know what's going to happen, but I am strongly motivated to
> give them what they need and I want to be able to do it reasonably and
> legitimately.
>
> Thanks for your input.
>
> CC
It sound like you've already made up your mind to do this hinky
contract.
Be sure to make the price 10x what you think it would be for the
7x24x6weeks you'll be spending getting it going.
It's up to you to decide if the investment in time and effort is worth
the "getting you foot in the door" opportunity you seem to think it will
be. Don't sign anything with a clause and have an option to walk away
at any time without any penalty if the mood strikes you. It just may.
Make the payment schedule sufficiently aggressive with milestones and
penalties for delays and non-payment.
Don't start work until they've signed the contract. Period. If their
legal balks at signing, walk away.
It's like you're going into a relationship knowing your going to get
screwed royally, risk your health, and end up hurt in the end. Just be
sure to wear latex and play safe.
I'm to old to bother with this sort of bullshit and am glad there are
young ones out there willing to do it. Be sure to learn a lot from this
experience. It may be the only thing you get out of it.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically by ignored]
------------------------------
Date: Tue, 05 Aug 2008 02:15:44 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: CLPM - a help group?
Message-Id: <050820080215445422%brian.d.foy@gmail.com>
In article <%9Hlk.17313$mh5.1803@nlpi067.nbdc.sbc.com>, Adam Worrall
<worrall+unet@cs.bris.ac.uk> wrote:
> > I've never seen an official charter for this group, but it certainly
> > isn't a help desk. It's for general discussion of Perl. That might be
> > questions, answers, essays, or whatever else people decide to post.
>
> Please explain, who actually decides that it isn't a help?
I think you mean "isn't a help desk". A help desk is a formally
established service where customers walk up and someone helps them.
No one here is obligated to do anything, and there aren't office hours,
shifts, or responsilibities. That people do answer questions here
doesn't mean it's purpose is to answer questions.
Help desks aren't lunch rooms, football fields, or street corners. This
newsgroup, however, can be whatever it decides to be, and even that can
change.
------------------------------
Date: Tue, 05 Aug 2008 02:04:34 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 4.36 How can I expand variables in text strings?
Message-Id: <050820080204345209%brian.d.foy@gmail.com>
In article <tqmim5xmel.ln2@carpet.zombinet>, Eric Pozharski
<whynot@pozharski.name> wrote:
> brian d foy <brian.d.foy@gmail.com> wrote:
> > In article <fc8cm5xnc2.ln2@carpet.zombinet>, Eric Pozharski
> > <whynot@pozharski.name> wrote:
>
> >> npc <npc@zomg.tk> wrote:
> >> > On Fri, 01 Aug 2008 06:03:03 -0700, PerlFAQ Server wrote:
> >> >> 4.36: How can I expand variables in text strings?
> >> > I don't understand this faq entry. I'm probably misunderstanding
> >> > it.
> >> Never mind. It's a ping-pong FAQ.
>
> > I'm not familiar with " ping-pong FAQ". Can you explain that?
>
> That was paraphrased from C<ping-pong thread>. I admit, that this
> particular entry doesn't go that far though.
And what does ping-pong thread mean? I still don't get what you are
pointing out about the answer that I might need to fix.
[snip]
> A-ha, now I see what I've missed. However than, please note that that
> entry misses a bit of explanation why using C<qq()> doesn't count as
> expansion.
Are we talking about the same answer? This one doesn't use qq().
------------------------------
Date: Tue, 05 Aug 2008 01:58:08 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 4.61 How can I always keep my hash sorted?
Message-Id: <050820080158082072%brian.d.foy@gmail.com>
In article <jaff9412r63lheec1h83lqtr0hca1vsgup@4ax.com>, Jürgen Exner
<jurgenex@hotmail.com> wrote:
> Ted Zlatanov <tzz@lifelogs.com> wrote:
> >On Sun, 03 Aug 2008 23:03:46 GMT Jürgen Exner <jurgenex@hotmail.com> wrote:
> >JE> If you want a sorted hash, then you don't want a hash but some other
> >JE> data structure.
> >
> >It's funny, however, that Perl pretends a hash is a list in many places,
> >e.g.
> >
> >%hash = ( 1 => 2 );
>
> Well, not really. It is a notation for a hash.
We explain it in Learning Perl by saying that there is no literal
representation of a hash and that you have to fake it with a list. So,
in that expression, you're assigning a list to a hash, and the
assignment takes care of turning the list into the behind-the-scenes
data structure.
Students aren't confused by that. *shrug*
------------------------------
Date: Tue, 05 Aug 2008 02:00:46 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 4.61 How can I always keep my hash sorted?
Message-Id: <050820080200461532%brian.d.foy@gmail.com>
In article
<23c2ab06-51d5-4ad3-b70a-b3bca35d0ebf@25g2000hsx.googlegroups.com>,
Bill H <bill@ts1000.us> wrote:
> On Aug 3, 3:03 pm, PerlFAQ Server <br...@stonehenge.com> wrote:
> > 4.61: How can I always keep my hash sorted?
> Iwonder when this would be an issue? If you had an unsorted hash you
> could just sort it.
It's often an issue when people want to remember the insertion order of
the keys.
However, I think that you've missed the point of hashes. Perl decides
hwo to store them so it can look up any value quickly and as fast as
any other value. Check out the chapter in Learning Perl on hashes :)
------------------------------
Date: 05 Aug 2008 07:04:03 GMT
From: xhoster@gmail.com
Subject: Re: FAQ 4.61 How can I always keep my hash sorted?
Message-Id: <20080805030408.084$nG@newsreader.com>
Ben Morrow <ben@morrow.me.uk> wrote:
>
> 'tie' is provided so you can create a hash that is built any way you
> like, and with the appropriate application of XS and magic you can even
> make it as efficient as the builtin hashes.
Are there working examples of this? I've thought it would be nice to have
perl's own hash implementation copied from the guts and put into a tie able
XS module, for playing around purposes.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Tue, 05 Aug 2008 02:24:37 -0500
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: highly restrictive sub-classing
Message-Id: <050820080224377387%brian.d.foy@gmail.com>
In article <20080804125631.140$MA@newsreader.com>, <xhoster@gmail.com>
wrote:
> I have a lot of scripts that use a memory-hungry module, but most of them
> use only a small subset of that module's features, and it should be
> possible to implement that subset in a more memory efficient way.
>
> I want to "subclass" the memory hungry module. Many of the methods, ones
> which are rarely used and can't be made memory efficient, will not be
> implemented in the subclass.
Subclassing is probably the wrong technology here. Have you looked at
using mixins or plugins? You separate the methods and features into
functional groups in separate modules then only load the modules you
need. They put their methods into the same namespace so you keep the
same interface, but you don't load stuff you don't need.
------------------------------
Date: Tue, 5 Aug 2008 04:42:22 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Aug 5 2008
Message-Id: <K542EM.us8@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
App-ZofCMS-Plugin-Syntax-Highlight-HTML-0.0101
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-Syntax-Highlight-HTML-0.0101/
provide HTML code snippets on your site
----
App-ZofCMS-Test-Plugin-0.0103
http://search.cpan.org/~zoffix/App-ZofCMS-Test-Plugin-0.0103/
test module for testing ZofCMS plugins
----
B-OPCheck-0.26
http://search.cpan.org/~nuffin/B-OPCheck-0.26/
PL_check hacks using Perl callbacks
----
B-OPCheck-0.27
http://search.cpan.org/~nuffin/B-OPCheck-0.27/
PL_check hacks using Perl callbacks
----
B-XSUB-Dumber-0.01
http://search.cpan.org/~nuffin/B-XSUB-Dumber-0.01/
B::OPCheck demo for microoptimizing XSUB invocation.
----
Biblio-Thesaurus-0.30
http://search.cpan.org/~ambs/Biblio-Thesaurus-0.30/
Perl extension for managing ISO thesaurus
----
Biblio-Thesaurus-0.31
http://search.cpan.org/~ambs/Biblio-Thesaurus-0.31/
Perl extension for managing ISO thesaurus
----
CGI-Application-Plugin-AnyCGI-0.01
http://search.cpan.org/~mab/CGI-Application-Plugin-AnyCGI-0.01/
Use your favourite CGI::* module with CGI::Application (instead of CGI.pm)
----
CGI-Cookie-XS-0.12
http://search.cpan.org/~agent/CGI-Cookie-XS-0.12/
HTTP Cookie parser in C
----
CGI-Cookie-XS-0.13
http://search.cpan.org/~agent/CGI-Cookie-XS-0.13/
HTTP Cookie parser in C
----
CGI-Lazy-0.03
http://search.cpan.org/~vayde/CGI-Lazy-0.03/
----
CPANPLUS-Shell-Wx-0.02
http://search.cpan.org/~skamansam/CPANPLUS-Shell-Wx-0.02/
A CPANPLUS GUI Shell written in wxWidgets
----
Continuity-0.995
http://search.cpan.org/~awwaiid/Continuity-0.995/
Abstract away statelessness of HTTP, for stateful Web applications
----
Distribution-Guess-BuildSystem-0.10_02
http://search.cpan.org/~bdfoy/Distribution-Guess-BuildSystem-0.10_02/
This is the description
----
Email-Send-Gandi-0.32
http://search.cpan.org/~lbrocard/Email-Send-Gandi-0.32/
Send Messages using Gandi
----
Geometry-Primitive-0.07
http://search.cpan.org/~gphat/Geometry-Primitive-0.07/
Primitive Geometry Entities
----
Glib-Ex-ObjectBits-2
http://search.cpan.org/~kryde/Glib-Ex-ObjectBits-2/
----
HTML-Template-Compiled-Filter-Whitespace-0.05
http://search.cpan.org/~steffenw/HTML-Template-Compiled-Filter-Whitespace-0.05/
whitespace filter for HTML output
----
Iterator-Diamond-0.01
http://search.cpan.org/~jv/Iterator-Diamond-0.01/
Iterate through the files from ARGV
----
Iterator-Diamond-0.02
http://search.cpan.org/~jv/Iterator-Diamond-0.02/
Iterate through the files from ARGV
----
Lingua-Flags-0.05
http://search.cpan.org/~ambs/Lingua-Flags-0.05/
Provide small flag icons
----
Locale-Maketext-Lexicon-0.67
http://search.cpan.org/~jesse/Locale-Maketext-Lexicon-0.67/
Use other catalog formats in Maketext
----
Locale-Maketext-TieHash-L10N-0.09
http://search.cpan.org/~steffenw/Locale-Maketext-TieHash-L10N-0.09/
Tying language handle to a hash
----
MIDI-Tweaks-0.07
http://search.cpan.org/~jv/MIDI-Tweaks-0.07/
Enhancements to MIDI.pm.
----
Net-SMS-2Way-0.06
http://search.cpan.org/~lengel/Net-SMS-2Way-0.06/
BulkSMS API
----
POE-Component-CPAN-Reporter-0.04
http://search.cpan.org/~bingos/POE-Component-CPAN-Reporter-0.04/
Bringing the power of POE to CPAN smoke testing.
----
POE-Component-CPAN-YACSmoke-1.32
http://search.cpan.org/~bingos/POE-Component-CPAN-YACSmoke-1.32/
Bringing the power of POE to CPAN smoke testing.
----
POE-Component-CPAN-YACSmoke-1.34
http://search.cpan.org/~bingos/POE-Component-CPAN-YACSmoke-1.34/
Bringing the power of POE to CPAN smoke testing.
----
POE-Component-CPANPLUS-YACSmoke-1.44
http://search.cpan.org/~bingos/POE-Component-CPANPLUS-YACSmoke-1.44/
Bringing the power of POE to CPAN smoke testing.
----
POE-Component-IRC-Plugin-MegaHAL-0.01
http://search.cpan.org/~hinrik/POE-Component-IRC-Plugin-MegaHAL-0.01/
A PoCo-IRC plugin which wraps an instance of POE::Component::AI::MegaHAL.
----
POE-Component-IRC-Plugin-WWW-CPANRatings-RSS-0.0103
http://search.cpan.org/~zoffix/POE-Component-IRC-Plugin-WWW-CPANRatings-RSS-0.0103/
announce CPAN ratings on IRC from RSS feed on http://cpanratings.perl.org/
----
POOF-1.0_1
http://search.cpan.org/~bmillares/POOF-1.0_1/
Perl extension that provides stronger typing, encapsulation and inheritance.
----
Path-Abstract-0.087
http://search.cpan.org/~rkrimen/Path-Abstract-0.087/
Fast and featureful UNIX-style path manipulation
----
Path-Abstract-0.088
http://search.cpan.org/~rkrimen/Path-Abstract-0.088/
Fast and featureful UNIX-style path manipulation
----
RDF-Redland-Model-ExifTool-0.03
http://search.cpan.org/~arnhemcr/RDF-Redland-Model-ExifTool-0.03/
extends Redland set of RDF statements (RDF::Redland::Model) to process Exif meta data from ExifTool (Image::ExifTool) into RDF statements
----
RRD-CGI-Image-0.01
http://search.cpan.org/~joshua/RRD-CGI-Image-0.01/
accept CGI-style rrdgraph args to build and print image
----
RSSycklr-0.02
http://search.cpan.org/~ashley/RSSycklr-0.02/
(beta) Highly configurable recycling of syndication (RSS/Atom) feeds into tailored, guaranteed XHTML fragments.
----
RSSycklr-0.03
http://search.cpan.org/~ashley/RSSycklr-0.03/
(beta) Highly configurable recycling of syndication (RSS/Atom) feeds into tailored, guaranteed XHTML fragments.
----
Rose-DBx-Object-Renderer-0.24
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.24/
Web UI Rendering for Rose::DB::Object
----
Spread-Client-0.03_01
http://search.cpan.org/~mbailey/Spread-Client-0.03_01/
Spread client that allows synchronous OR asynchronous multicast/receive/join/leave/disconnect to spread daemons
----
Sub-Nary-0.01
http://search.cpan.org/~vpit/Sub-Nary-0.01/
Try to count how many elements a subroutine can return in list context.
----
Syntax-Highlight-CSS-0.0101
http://search.cpan.org/~zoffix/Syntax-Highlight-CSS-0.0101/
highlight CSS syntax
----
TRD-Velocity-0.0.7
http://search.cpan.org/~ichi/TRD-Velocity-0.0.7/
Template engine
----
Test-Aggregate-0.32_03
http://search.cpan.org/~ovid/Test-Aggregate-0.32_03/
Aggregate *.t tests to make them run faster.
----
Test-Pod-Snippets-0.04
http://search.cpan.org/~yanick/Test-Pod-Snippets-0.04/
Generate tests from pod code snippets
----
Tkx-FindBar-0.05
http://search.cpan.org/~mjcarman/Tkx-FindBar-0.05/
Perl Tkx extension for an incremental search toolbar
----
VS-RuleEngine-0.09
http://search.cpan.org/~claesjac/VS-RuleEngine-0.09/
Generic rule based processing engine
----
WWW-Yandex-TIC-0.02
http://search.cpan.org/~bashlov/WWW-Yandex-TIC-0.02/
Query Yandex Thematic Index of Citing (TIC) for domain
----
WWW-Yandex-TIC-0.02-1
http://search.cpan.org/~apla/WWW-Yandex-TIC-0.02-1/
Query Yandex Thematic Index of Citing (TIC) for domain
----
XML-SAX-0.95
http://search.cpan.org/~grantm/XML-SAX-0.95/
Simple API for XML
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Tue, 05 Aug 2008 07:12:27 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
Message-Id: <v3Tlk.17940$jI5.967@flpi148.ffdc.sbc.com>
Outline
Before posting to comp.lang.perl.misc
Must
- Check the Perl Frequently Asked Questions (FAQ)
- Check the other standard Perl docs (*.pod)
Really Really Should
- Lurk for a while before posting
- Search a Usenet archive
If You Like
- Check Other Resources
Posting to comp.lang.perl.misc
Is there a better place to ask your question?
- Question should be about Perl, not about the application area
How to participate (post) in the clpmisc community
- Carefully choose the contents of your Subject header
- Use an effective followup style
- Speak Perl rather than English, when possible
- Ask perl to help you
- Do not re-type Perl code
- Provide enough information
- Do not provide too much information
- Do not post binaries, HTML, or MIME
Social faux pas to avoid
- Asking a Frequently Asked Question
- Asking a question easily answered by a cursory doc search
- Asking for emailed answers
- Beware of saying "doesn't work"
- Sending a "stealth" Cc copy
Be extra cautious when you get upset
- Count to ten before composing a followup when you are upset
- Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------
Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)
This newsgroup, commonly called clpmisc, is a technical newsgroup
intended to be used for discussion of Perl related issues (except job
postings), whether it be comments or questions.
As you would expect, clpmisc discussions are usually very technical in
nature and there are conventions for conduct in technical newsgroups
going somewhat beyond those in non-technical newsgroups.
The article at:
http://www.catb.org/~esr/faqs/smart-questions.html
describes how to get answers from technical people in general.
This article describes things that you should, and should not, do to
increase your chances of getting an answer to your Perl question. It is
available in POD, HTML and plain text formats at:
http://www.rehabitation.com/clpmisc.shtml
For more information about netiquette in general, see the "Netiquette
Guidelines" at:
http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
A note to newsgroup "regulars":
Do not use these guidelines as a "license to flame" or other
meanness. It is possible that a poster is unaware of things
discussed here. Give them the benefit of the doubt, and just
help them learn how to post, rather than assume that they do
know and are being the "bad kind" of Lazy.
A note about technical terms used here:
In this document, we use words like "must" and "should" as
they're used in technical conversation (such as you will
encounter in this newsgroup). When we say that you *must* do
something, we mean that if you don't do that something, then
it's unlikely that you will benefit much from this group.
We're not bossing you around; we're making the point without
lots of words.
Do *NOT* send email to the maintainer of these guidelines. It will be
discarded unread. The guidelines belong to the newsgroup so all
discussion should appear in the newsgroup. I am just the secretary that
writes down the consensus of the group.
Before posting to comp.lang.perl.misc
Must
This section describes things that you *must* do before posting to
clpmisc, in order to maximize your chances of getting meaningful replies
to your inquiry and to avoid getting flamed for being lazy and trying to
have others do your work.
The perl distribution includes documentation that is copied to your hard
drive when you install perl. Also installed is a program for looking
things up in that (and other) documentation named 'perldoc'.
You should either find out where the docs got installed on your system,
or use perldoc to find them for you. Type "perldoc perldoc" to learn how
to use perldoc itself. Type "perldoc perl" to start reading Perl's
standard documentation.
Check the Perl Frequently Asked Questions (FAQ)
Checking the FAQ before posting is required in Big 8 newsgroups in
general, there is nothing clpmisc-specific about this requirement.
You are expected to do this in nearly all newsgroups.
You can use the "-q" switch with perldoc to do a word search of the
questions in the Perl FAQs.
Check the other standard Perl docs (*.pod)
The perl distribution comes with much more documentation than is
available for most other newsgroups, so in clpmisc you should also
see if you can find an answer in the other (non-FAQ) standard docs
before posting.
It is *not* required, or even expected, that you actually *read* all of
Perl's standard docs, only that you spend a few minutes searching them
before posting.
Try doing a word-search in the standard docs for some words/phrases
taken from your problem statement or from your very carefully worded
"Subject:" header.
Really Really Should
This section describes things that you *really should* do before posting
to clpmisc.
Lurk for a while before posting
This is very important and expected in all newsgroups. Lurking means
to monitor a newsgroup for a period to become familiar with local
customs. Each newsgroup has specific customs and rituals. Knowing
these before you participate will help avoid embarrassing social
situations. Consider yourself to be a foreigner at first!
Search a Usenet archive
There are tens of thousands of Perl programmers. It is very likely
that your question has already been asked (and answered). See if you
can find where it has already been answered.
One such searchable archive is:
http://groups.google.com/advanced_group_search
If You Like
This section describes things that you *can* do before posting to
clpmisc.
Check Other Resources
You may want to check in books or on web sites to see if you can
find the answer to your question.
But you need to consider the source of such information: there are a
lot of very poor Perl books and web sites, and several good ones
too, of course.
Posting to comp.lang.perl.misc
There can be 200 messages in clpmisc in a single day. Nobody is going to
read every article. They must decide somehow which articles they are
going to read, and which they will skip.
Your post is in competition with 199 other posts. You need to "win"
before a person who can help you will even read your question.
These sections describe how you can help keep your article from being
one of the "skipped" ones.
Is there a better place to ask your question?
Question should be about Perl, not about the application area
It can be difficult to separate out where your problem really is,
but you should make a conscious effort to post to the most
applicable newsgroup. That is, after all, where you are the most
likely to find the people who know how to answer your question.
Being able to "partition" a problem is an essential skill for
effectively troubleshooting programming problems. If you don't get
that right, you end up looking for answers in the wrong places.
It should be understood that you may not know that the root of your
problem is not Perl-related (the two most frequent ones are CGI and
Operating System related), so off-topic postings will happen from
time to time. Be gracious when someone helps you find a better place
to ask your question by pointing you to a more applicable newsgroup.
How to participate (post) in the clpmisc community
Carefully choose the contents of your Subject header
You have 40 precious characters of Subject to win out and be one of
the posts that gets read. Don't waste them. Take care while
composing them, they are the key that opens the door to getting an
answer.
Spend them indicating what aspect of Perl others will find if they
should decide to read your article.
Do not spend them indicating "experience level" (guru, newbie...).
Do not spend them pleading (please read, urgent, help!...).
Do not spend them on non-Subjects (Perl question, one-word
Subject...)
For more information on choosing a Subject see "Choosing Good
Subject Lines":
http://www.cpan.org/authors/id/D/DM/DMR/subjects.post
Part of the beauty of newsgroup dynamics, is that you can contribute
to the community with your very first post! If your choice of
Subject leads a fellow Perler to find the thread you are starting,
then even asking a question helps us all.
Use an effective followup style
When composing a followup, quote only enough text to establish the
context for the comments that you will add. Always indicate who
wrote the quoted material. Never quote an entire article. Never
quote a .signature (unless that is what you are commenting on).
Intersperse your comments *following* each section of quoted text to
which they relate. Unappreciated followup styles are referred to as
"top-posting", "Jeopardy" (because the answer comes before the
question), or "TOFU" (Text Over, Fullquote Under).
Reversing the chronology of the dialog makes it much harder to
understand (some folks won't even read it if written in that style).
For more information on quoting style, see:
http://web.presby.edu/~nnqadmin/nnq/nquote.html
Speak Perl rather than English, when possible
Perl is much more precise than natural language. Saying it in Perl
instead will avoid misunderstanding your question or problem.
Do not say: I have variable with "foo\tbar" in it.
Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
or I have $var = <DATA> (and show the data line).
Ask perl to help you
You can ask perl itself to help you find common programming mistakes
by doing two things: enable warnings (perldoc warnings) and enable
"strict"ures (perldoc strict).
You should not bother the hundreds/thousands of readers of the
newsgroup without first seeing if a machine can help you find your
problem. It is demeaning to be asked to do the work of a machine. It
will annoy the readers of your article.
You can look up any of the messages that perl might issue to find
out what the message means and how to resolve the potential mistake
(perldoc perldiag). If you would like perl to look them up for you,
you can put "use diagnostics;" near the top of your program.
Do not re-type Perl code
Use copy/paste or your editor's "import" function rather than
attempting to type in your code. If you make a typo you will get
followups about your typos instead of about the question you are
trying to get answered.
Provide enough information
If you do the things in this item, you will have an Extremely Good
chance of getting people to try and help you with your problem!
These features are a really big bonus toward your question winning
out over all of the other posts that you are competing with.
First make a short (less than 20-30 lines) and *complete* program
that illustrates the problem you are having. People should be able
to run your program by copy/pasting the code from your article. (You
will find that doing this step very often reveals your problem
directly. Leading to an answer much more quickly and reliably than
posting to Usenet.)
Describe *precisely* the input to your program. Also provide example
input data for your program. If you need to show file input, use the
__DATA__ token (perldata.pod) to provide the file contents inside of
your Perl program.
Show the output (including the verbatim text of any messages) of
your program.
Describe how you want the output to be different from what you are
getting.
If you have no idea at all of how to code up your situation, be sure
to at least describe the 2 things that you *do* know: input and
desired output.
Do not provide too much information
Do not just post your entire program for debugging. Most especially
do not post someone *else's* entire program.
Do not post binaries, HTML, or MIME
clpmisc is a text only newsgroup. If you have images or binaries
that explain your question, put them in a publically accessible
place (like a Web server) and provide a pointer to that location. If
you include code, cut and paste it directly in the message body.
Don't attach anything to the message. Don't post vcards or HTML.
Many people (and even some Usenet servers) will automatically filter
out such messages. Many people will not be able to easily read your
post. Plain text is something everyone can read.
Social faux pas to avoid
The first two below are symptoms of lots of FAQ asking here in clpmisc.
It happens so often that folks will assume that it is happening yet
again. If you have looked but not found, or found but didn't understand
the docs, say so in your article.
Asking a Frequently Asked Question
It should be understood that you may have missed the applicable FAQ
when you checked, which is not a big deal. But if the Frequently
Asked Question is worded similar to your question, folks will assume
that you did not look at all. Don't become indignant at pointers to
the FAQ, particularly if it solves your problem.
Asking a question easily answered by a cursory doc search
If folks think you have not even tried the obvious step of reading
the docs applicable to your problem, they are likely to become
annoyed.
If you are flamed for not checking when you *did* check, then just
shrug it off (and take the answer that you got).
Asking for emailed answers
Emailed answers benefit one person. Posted answers benefit the
entire community. If folks can take the time to answer your
question, then you can take the time to go get the answer in the
same place where you asked the question.
It is OK to ask for a *copy* of the answer to be emailed, but many
will ignore such requests anyway. If you munge your address, you
should never expect (or ask) to get email in response to a Usenet
post.
Ask the question here, get the answer here (maybe).
Beware of saying "doesn't work"
This is a "red flag" phrase. If you find yourself writing that,
pause and see if you can't describe what is not working without
saying "doesn't work". That is, describe how it is not what you
want.
Sending a "stealth" Cc copy
A "stealth Cc" is when you both email and post a reply without
indicating *in the body* that you are doing so.
Be extra cautious when you get upset
Count to ten before composing a followup when you are upset
This is recommended in all Usenet newsgroups. Here in clpmisc, most
flaming sub-threads are not about any feature of Perl at all! They
are most often for what was seen as a breach of netiquette. If you
have lurked for a bit, then you will know what is expected and won't
make such posts in the first place.
But if you get upset, wait a while before writing your followup. I
recommend waiting at least 30 minutes.
Count to ten after composing and before posting when you are upset
After you have written your followup, wait *another* 30 minutes
before committing yourself by posting it. You cannot take it back
once it has been said.
AUTHOR
Tad McClellan and many others on the comp.lang.perl.misc newsgroup.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Mon, 4 Aug 2008 21:47:17 -0700 (PDT)
From: "Hein, Nashua NH" <heinvandenheuvel@gmail.com>
Subject: Re: Sort using reference to subroutine name?
Message-Id: <13c3575a-549b-46e4-b8c8-7cb27ab1341d@m36g2000hse.googlegroups.com>
On Aug 4, 11:49=A0pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth "Hein, Nashua NH" <heinvandenheu...@gmail.com>:
>
>
>
> > I have function which I'd like to call telling it how to sort some arra=
ys.
:
> > my $sort_function =3D $_[0]->();
> Why are you doing this? (What did you think it would do for you?) I'm
> fairly sure you just want
>
> =A0 =A0 my $sort_function =3D $_[0];
I tried that first, but it didn't work for me.
So I check some pod pages and googles around to find that suggestion
in:
http://www.perlmonks.org/index.pl?node_id=3D680130
> =A0 =A0 foreach (sort $sort_function keys %some_array) {
>
> except %some_array isn't an array, it's a hash.
Right, sorry for the sloppy names. It was a hash.
> {$sort_function} will attempt to sort with a sub that returns
> $sort_function every time, which is unlikely to be successful.
Yeah, that is probably critical, but I'm not sure I entirely undestand
that.
I had tried putting a debug "print qq(in sort $a $b\n)" withing the
function indeed showed undefs for $a and $b :-(
> Note that the sort function will need to be compiled into the package
> that is current when 'sort' is called (or you could use the
> ($$)-prototyped variant, but that's both slow and obscure) as otherwise
> $a and $b won't work.
That sounds like my problem.
> I'm not quite sure why you're doing this: why not just pass a ref to the
> hash to sort by, and then use something like
Because I was thinking of various other sort funtions, not just
varying by hash.
> =A0 =A0 my $sort_by =3D $_[0];
> =A0 =A0 sort { $sort_by->{$a} <=3D> $sort_by{$b} } ...;
Right, I get that, and have used similar contructs before.
> &print_sorted ( $sort_by_y_ref, "by Y" );
>
> Don't call subs with & unless you know what it does, and what it does is
> what you want (hint: it probably isn't).
I more or less know that, but got carried away in trying almost random
solutions for my sort challenge, as reasoned (flawed reasoning :-)
solutions did not work.
Thanks for the quick feedback!
Hein.
------------------------------
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:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#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 1769
***************************************