[31234] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2479 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 16 06:09:48 2009

Date: Tue, 16 Jun 2009 03:09:05 -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, 16 Jun 2009     Volume: 11 Number: 2479

Today's topics:
        cannot solve a memory leak <scottalorda@libello.com>
    Re: format the multiselect option froma web form <finar76@gmail.com>
    Re: Lexical variables in (?{...}) regexp constructs sln@netherlands.com
        Mlatestlaptop.blogspot.com <mohummadasif@gmail.com>
        new CPAN modules on Tue Jun 16 2009 (Randal Schwartz)
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@seesig.invalid
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 16 Jun 2009 01:33:50 -0700 (PDT)
From: =?ISO-8859-1?Q?S=E9bastien_Cottalorda?= <scottalorda@libello.com>
Subject: cannot solve a memory leak
Message-Id: <33a6f0c6-0332-44e1-a831-c5cbf290f39b@k2g2000yql.googlegroups.com>

Hi all,
I develop an program based on a module names 'SHM' based on
IPC::Shareable module.
I'm under Fedora core 9 (kernel 2.6.27.21-78.2.41.fc9.i686)   with
Perl 5.10.0

it works like this:

IPC::Shareable  does this when it try to get something in memory
segment:
--------------------------------------------------------------------------
sub FETCH {
    [snip]
    my $data;
    if ($self->{_lock} || $self->{_iterating}) {
        $self->{_iterating} = ''; # In case we break out
        $data = $self->{_data};
    } else {
        $data = _thaw($self->{_shm});
        $self->{_data} = $data;
    }
    my $val;
    [snip]
    # work with $data following $self->{_type} type => then put result
in $val variable
    return $val
}
 ....
sub _thaw {
[snip]
my $s = shift;
my $ice = $s->shmread;
my $tag = substr $ice, 0, 14, '';
if ($tag eq 'IPC::Shareable') {
        my $water = thaw $ice;       # imported from Storable module
        defined($water) or do {
            require Carp;
            _debug "Prob into shm segment ", $s->id, ": ", $ice;
            Carp::confess "Munged shared memory segment (size
exceeded?) into shm segment ";
        };
        return $water;
} else {
        return;
}
----------------------------------------------------------------------------------
my module, 'SHM', based on IPC::Shareable module does this
sub get_hash {
    my $this = shift;
    my $type    = ref($this) or croak "GET: $this is not an object";
    my $hashref = shift;
    my %datas = ();
    eval {
        %datas = %{$this->{_data}};    # line 537 on which I got
Munged share memory .... message
    };
    if ($@){
        croak "GET: Unable to get ".$hashref->{type}."| segment
allKeys : $@";
    }
    else {
        [snip]
    }
}
---------------------------------------------------------------------------------------------------------
my program base on the 'SHM' module does this
[snip]
my $memCmd = 'ps axfv | grep -P "^\s{0,}'.$$.'" | grep -v grep ';
print "MEMSize (BEFORE)=". `$memCmd` ;
if ($SEGMENT->shlock(LOCK_SH)){
    eval {
        $pano_SHM 	= $SEGMENT->get_hash({ type => 'panneau', primary
=> $control });
    };
    if ($@){
        [snip]
    }
    print "MEMSize (AFTER)=". `$memCmd` ;
}
else {
    print "unable to get a lock on SHM\n";
}

I run several time (5 times), in parallel, the same program.
I have then concurrent access to the memory segment.
On concurrent access, one process get the error :
"Munged shared memory segment (size exceeded?) into shm segment"
I note then that the virtual memory grow till 1,8 Go for the process
on which occured the access problem.
I trace this:

MEMSize (BEFORE)= 5080 pts/7    S+    17:47      0     3 13776  8992
0.2          \_ PK52
"Munged shared memory segment (size exceeded?) into shm segment" at
SHM line 537
MEMSize (AFTER)= 5080 pts/7    S+    17:47      0     3 1849624 9832
0.2          \_ PK52

If someone can help me in solving this problem , make me add some
useful trace somewhere, or whatever else .
Thanks in advance.

Sebastien


------------------------------

Date: Mon, 15 Jun 2009 23:03:25 -0700 (PDT)
From: Vit <finar76@gmail.com>
Subject: Re: format the multiselect option froma web form
Message-Id: <ca095989-2f86-4864-a3ce-8eab4c023e76@y6g2000prf.googlegroups.com>

On 15 Giu, 21:13, Tad J McClellan <ta...@seesig.invalid> wrote:
> Vit <fina...@gmail.com> wrote:
> > I have a .cgi that read the value from a "multiselect option list" and
>
> Where your data comes from is not relevant to your question,
> so it should not be included in your question.
>
> Have you seen the Posting Guidelines that are posted here frequently?
>
> > I get the following results:
>
> > $VAR1 =3D '1-option1';
> > $VAR2 =3D '3-option3';
> > $VAR3 =3D '5-option5';
>
> Where is your code that makes that output?
>
> You should try to make a short and complete program *that we can run*
> that illustrates your problem.
>
> > is it possible to format like this:
>
> > option1: selected
> > option2: not selected
> > option3: selected
> > option4: not selected
> > option5: selected
> > option6: not selected
>
> > the perl code is the following:
>
> > my @interest =3D $query->param("interest");
>
> That code does not make any output at all, let alone the output
> that you claim...
>
> > any suggestion?????
>
> It is a SMOP.
>
> Note that my answer makes no mention of the CGI environment, because
> where the data comes from does not matter to the solution.
>
> ------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my @interest =3D qw/ 1-option1 3-option3 5-option5 /;
>
> my %selected;
> foreach my $opt ( 'option1' .. 'option6' ) {
> =A0 =A0 if( grep /$opt/, @interest ) {
> =A0 =A0 =A0 =A0 $selected{$opt} =3D 'selected';
> =A0 =A0 }
> =A0 =A0 else {
> =A0 =A0 =A0 =A0 $selected{$opt} =3D 'not selected';
> =A0 =A0 }
>
> }
>
> print "$_: $selected{$_}\n" for sort keys %selected;
> ------------------
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

sorry for that...

I'm just reading a multiselection and put it on a "better format"....

use CGI;
use Data::Dumper;
use strict;
use warnings;

# Create the CGI object
my $query =3D new CGI;


my @interest =3D $query->param("interest");  (an array with the result
of the multiselection)

print MAIL Dumper @interest; (generate the text of en email)

and the result of in the email is as following:

$VAR1 =3D '1-option1';
$VAR2 =3D '3-option3';
$VAR3 =3D '5-option5';

what I'd like to "format" is the text of the email...

how can I generata an email with the text as following:

option1: selected
option2: not selected
option3: selected
option4: not selected
option5: selected
option6: not selected


thanks all


Vit




------------------------------

Date: Mon, 15 Jun 2009 17:00:58 -0700
From: sln@netherlands.com
Subject: Re: Lexical variables in (?{...}) regexp constructs
Message-Id: <limd351foqacmm856kt6c2b115im5onl5i@4ax.com>

On Mon, 15 Jun 2009 10:57:06 -0700 (PDT), Ala <ala.netstuff@gmail.com> wrote:

>Hi all,
>
>In perlre, the documentation for (?{...}) says:
>
>"Due to an unfortunate implementation issue, the Perl code contained
>in these blocks is treated as a compile time closure that can have
>seemingly bizarre consequences when used with lexically scoped
>variables inside of subroutines or loops. There are various
>workarounds for this, including simply using global variables instead.
>If you are using this construct and strange results occur then check
>for the use of lexically scoped variables."
>
>I'm indeed seeing weird things, mainly variables getting undefined for
>no reason.
>Any ideas on what the "various workarounds" that TFM is speaking of
>are? I'd rather stay as far away from global vars as I can.
>
>Thanks,
>--Ala

Probably the key phrase is "the Perl code contained in these blocks";
Imbedding code inside of a regular expression really has limited use
unless used in conjunction with a conditional or to immediatly store
the value of the last capture group.

It gets better, you can't nest another regular expression in the block
(since the engine is not reentrant).

Seemingly better results happen when you call a named subroutine from the
code block. Here, lexicals seem to work and m// seems to work, but not s///
(the latter causes a crash on my machine, so be carefull not to call a 
Perl function that uses the regex engine).

It seems the lack of explanation and numerous caveats are meant as a warning
to stay clear.

Below are a few examples.
The first one trys a lexical within the code block (not too good).
The second calls a subroutine (that does lexicals) from withing the code block.
The third is an example of somebody's IP parser I cleaned up that
shows extended conditional and code embedding (using 5.10).

Anyway, its hit or miss with extended/experimental stuff.

-sln



## ex. 1
================
use strict;
use warnings;

my $string = "yes no yes no";

while ( $string =~ /yes(?{my $test = printmsg(); print "test = '$test'\n";})/g) {}

sub printmsg
{
	print "found yes\n";
	'';
}
__END__
Output:
found yes
test = ''
Use of uninitialized value $string in pattern match (m//) at dd.pl line 6.

## ex. 2
================
use strict;
use warnings;

my $string = "yes no yes no";
my $test   = "this is test";

while ( $string =~ /yes(?{$test = printmsg($test);})/g) {}
print "test = '$test'\n";

sub printmsg
{
	my $param = shift;
	my $count = 2;

	while ($count--) {
		print "($count)found yes, was passed '$param'\n";
	}
	return '';
	## Cannot do regex if being called from embedded code
}
__END__
Output:
(1)found yes, was passed 'this is test'
(0)found yes, was passed 'this is test'
(1)found yes, was passed ''
(0)found yes, was passed ''
test = ''

## ex. 3
================
## IpMatch_5_10.pl
## (To test new Perl 5.10 conditionals)
## 

require 5.10.0;     # 5.10 only, new extended regex
use strict;
use warnings;

my $Octlimit = 255;

my $OctetPat = qr/
                  \b (\d{1,3}) \b   # capture a 3 digit number on boundries

                    (?(?{                 # start conditional code block

                          # print "$^N\n";    # uncomment to print what matched last
                          $^N > $Octlimit     # condition: is number > octet limit ?

                        })                # end code block

                          (*FAIL)         # yes, condition is true, force pattern to fail for this number
                    )
                  /x;

my $dottedQuadPat = qr/  # Capture quad parts to named variables in the %+ hash
              \s*
                   (?<O1>$OctetPat)
                  \.
                   (?<O2>$OctetPat)
                  \.
                   (?<O3>$OctetPat)
                  \.
                   (?<O4>$OctetPat)
               \s*
             /x;

my $DressedIPv4Pat =  qr/  # Capture dressed quad parts to named variables in the %+ hash
              \s* \[
                     $dottedQuadPat
                  \] \s*
             /x;

while (my $ip = <DATA>)
{
	chomp $ip;
	next if !length($ip);
	print "IP:\n'$ip'\n";

	## Match all valid ip octets
	my @match = $ip =~/$OctetPat/g;
	if (@match)
	{
		print "  ++ matched single octets\n";
		for my $val (@match) {
			print "     $val\n";
		}
	} else {
		print "  -- no single octet match\n";
	}

	## Match dotted quad ip
	if ($ip =~ /^$dottedQuadPat$/)
	{
		print "  ++ matched quad #.#.#.#\n";
		foreach my $key (sort keys %+) {
			print "     $key = $+{$key}\n";
		}
	} else {
		print "  -- no strict quad match\n";
	}

	## Match dressed dotted quad ip
	if ($ip =~ /^$DressedIPv4Pat$/)
	{
		print "  ++ matched dressed quad [#.#.#.#]\n";
		foreach my $key (sort keys %+) {
			print "     $key = $+{$key}\n";
		}
	} else {
		print "  -- no strict dressed quad match\n";
	}
}
__DATA__

1.12.123.254.255.256.4872
1.12.123.254
[123.254.255.255]





------------------------------

Date: Mon, 15 Jun 2009 17:47:09 -0700 (PDT)
From: Mohummadasif <mohummadasif@gmail.com>
Subject: Mlatestlaptop.blogspot.com
Message-Id: <d2507e09-3bb2-4356-a767-a7213557dd90@g15g2000pra.googlegroups.com>

Hi get information about latest laptop and pc and also free download
latest software games and beautifull screen savar ,,,,,, and many
more ,,,, get some fun......... God bless u


------------------------------

Date: Tue, 16 Jun 2009 04:42:28 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Jun 16 2009
Message-Id: <KLBEEs.1H7s@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.

ALPM-0.02
http://search.cpan.org/~juster/ALPM-0.02/
Perl OO version of libalpm, Archlinux's packaging system 
----
Audio-Scan-0.19
http://search.cpan.org/~agrundma/Audio-Scan-0.19/
XS parser for MP3, MP4, Ogg Vorbis, FLAC, ASF, WAV, AIFF, Musepack, Monkey's Audio 
----
Badger-0.06
http://search.cpan.org/~abw/Badger-0.06/
Perl Application Programming Toolkit 
----
CPAN-Mini-Inject-0.26
http://search.cpan.org/~andya/CPAN-Mini-Inject-0.26/
Inject modules into a CPAN::Mini mirror. 
----
Cache-Memcached-Fast-0.15
http://search.cpan.org/~kroki/Cache-Memcached-Fast-0.15/
Perl client for memcached, in C language 
----
Cache-Memcached-Fast-0.16
http://search.cpan.org/~kroki/Cache-Memcached-Fast-0.16/
Perl client for memcached, in C language 
----
CatalystX-Component-Traits-0.03
http://search.cpan.org/~rkitover/CatalystX-Component-Traits-0.03/
Automatic Trait Loading and Resolution for Catalyst Components 
----
Champlain-0.04
http://search.cpan.org/~potyl/Champlain-0.04/
Map rendering canvas 
----
Class-Method-Modifiers-1.04
http://search.cpan.org/~sartak/Class-Method-Modifiers-1.04/
provides Moose-like method modifiers 
----
DBIx-FedDB-0.01
http://search.cpan.org/~rogerhall/DBIx-FedDB-0.01/
Control a Federated Database with Catalyst and MySQL 
----
Data-UUID-1.202
http://search.cpan.org/~rjbs/Data-UUID-1.202/
Perl extension for generating Globally/Universally Unique Identifiers (GUIDs/UUIDs). 
----
Devel-TraceLoad-1.04
http://search.cpan.org/~andya/Devel-TraceLoad-1.04/
Discover which modules a Perl program loads. 
----
Digest-MD6-0.01
http://search.cpan.org/~andya/Digest-MD6-0.01/
Perl interface to the MD6 Algorithm 
----
Digest-MD6-0.02
http://search.cpan.org/~andya/Digest-MD6-0.02/
Perl interface to the MD6 Algorithm 
----
Email-Sender-0.091660
http://search.cpan.org/~rjbs/Email-Sender-0.091660/
a library for sending email 
----
Email-Sender-0.091661
http://search.cpan.org/~rjbs/Email-Sender-0.091661/
a library for sending email 
----
Email-Sender-Transport-SQLite-0.091660
http://search.cpan.org/~rjbs/Email-Sender-Transport-SQLite-0.091660/
deliver mail to an sqlite db for testing 
----
Encode-Buckwalter-1.1
http://search.cpan.org/~graff/Encode-Buckwalter-1.1/
ASCII-based Transliteration for Arabic 
----
Encode-EUCJPASCII-0.02
http://search.cpan.org/~nezumi/Encode-EUCJPASCII-0.02/
eucJP-ascii - An eucJP-open mapping 
----
GRID-Machine-0.105
http://search.cpan.org/~casiano/GRID-Machine-0.105/
Remote Procedure Calls over a SSH link 
----
Gtk2-Ex-TimeEntry-0.02
http://search.cpan.org/~jhallock/Gtk2-Ex-TimeEntry-0.02/
Widget for entering times 
----
Gtk2-Ex-TimeEntry-0.03
http://search.cpan.org/~jhallock/Gtk2-Ex-TimeEntry-0.03/
Widget for entering times 
----
HTML-MobileJp-0.06
http://search.cpan.org/~tokuhirom/HTML-MobileJp-0.06/
generate mobile-jp html tags 
----
HTML-Query-0.02
http://search.cpan.org/~abw/HTML-Query-0.02/
jQuery-like selection queries for HTML::Element 
----
HTML-TurboForm-0.46
http://search.cpan.org/~camelcase/HTML-TurboForm-0.46/
----
HTTP-MobileAttribute-0.19_01
http://search.cpan.org/~tokuhirom/HTTP-MobileAttribute-0.19_01/
Yet Another HTTP::MobileAgent 
----
HTTP-MobileAttribute-0.19_02
http://search.cpan.org/~tokuhirom/HTTP-MobileAttribute-0.19_02/
Yet Another HTTP::MobileAgent 
----
HTTP-Proxy-Selective-0.002
http://search.cpan.org/~bobtfish/HTTP-Proxy-Selective-0.002/
Simple HTTP Proxy which serves some paths from locations on local disk. 
----
Log-Dump-0.04
http://search.cpan.org/~ishigaki/Log-Dump-0.04/
simple logger mainly for debugging 
----
Log-Dump-0.05
http://search.cpan.org/~ishigaki/Log-Dump-0.05/
simple logger mainly for debugging 
----
Module-Build-0.33_02
http://search.cpan.org/~dagolden/Module-Build-0.33_02/
Build and install Perl modules 
----
Module-Release-2.05
http://search.cpan.org/~bdfoy/Module-Release-2.05/
Automate software releases 
----
MooseX-AlwaysCoerce-0.01
http://search.cpan.org/~rkitover/MooseX-AlwaysCoerce-0.01/
Automatically enable coercions for Moose attributes 
----
MooseX-Method-0.43
http://search.cpan.org/~gphat/MooseX-Method-0.43/
(DEPRECATED) Method declaration with type checking 
----
Mouse-0.24
http://search.cpan.org/~sartak/Mouse-0.24/
Moose minus the antlers 
----
Net-OAuth-0.16
http://search.cpan.org/~kgrennan/Net-OAuth-0.16/
OAuth protocol support 
----
Net-Rovio-0.8.1
http://search.cpan.org/~ivantis/Net-Rovio-0.8.1/
A Perl module for Rovio manipulation 
----
Net-Rovio-0.9
http://search.cpan.org/~ivantis/Net-Rovio-0.9/
A Perl module for Rovio manipulation 
----
Number-Fraction-1.12
http://search.cpan.org/~davecross/Number-Fraction-1.12/
Perl extension to model fractions 
----
Object-Simple-2.0006
http://search.cpan.org/~kimoto/Object-Simple-2.0006/
Light Weight Minimal Object System 
----
OpenSSL-0.10
http://search.cpan.org/~oesi/OpenSSL-0.10/
----
PDL-Graphics-PLplot-0.49
http://search.cpan.org/~dhunt/PDL-Graphics-PLplot-0.49/
Object-oriented interface from perl/PDL to the PLPLOT plotting library 
----
PDL-Graphics-PLplot-0.50
http://search.cpan.org/~dhunt/PDL-Graphics-PLplot-0.50/
Object-oriented interface from perl/PDL to the PLPLOT plotting library 
----
POE-Component-Schedule-0.02
http://search.cpan.org/~dolmen/POE-Component-Schedule-0.02/
Schedule POE events using DateTime::Set iterators 
----
POE-Component-Server-BigBrother-0.04
http://search.cpan.org/~yblusseau/POE-Component-Server-BigBrother-0.04/
POE Component that implements BigBrother daemon functionality 
----
Squatting-On-Mojo-0.02
http://search.cpan.org/~beppu/Squatting-On-Mojo-0.02/
squat on top of Mojo 
----
Test-Weaken-2.003_003
http://search.cpan.org/~jkegl/Test-Weaken-2.003_003/
Test that freed memory objects were, indeed, freed 
----
Text-FixedWidth-0.06
http://search.cpan.org/~jhannah/Text-FixedWidth-0.06/
Easy OO manipulation of fixed width text files 
----
Variable-Lazy-0.02
http://search.cpan.org/~leont/Variable-Lazy-0.02/
Lazy variables 
----
WWW-DanDomain-0.01
http://search.cpan.org/~jonasbn/WWW-DanDomain-0.01/
class to assist in interacting with DanDomain admin interface 
----
WWW-ItsABot-0.01
http://search.cpan.org/~leto/WWW-ItsABot-0.01/
Ask itsabot.com if a Twitter user is a bot 
----
WWW-Tumblr-4.1
http://search.cpan.org/~damog/WWW-Tumblr-4.1/
Perl interface for the Tumblr API 
----
ZConf-Mail-1.0.0
http://search.cpan.org/~vvelox/ZConf-Mail-1.0.0/
Misc mail client functions backed by ZConf. 
----
libwww-perl-5.827
http://search.cpan.org/~gaas/libwww-perl-5.827/
----
local-lib-1.004002
http://search.cpan.org/~apeiron/local-lib-1.004002/
create and use a local lib/ for perl modules with PERL5LIB 


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, 16 Jun 2009 07:11:47 GMT
From: tadmc@seesig.invalid
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.9 $)
Message-Id: <TAHZl.31785$Ws1.25898@nlpi064.nbdc.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.9 $)
    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_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: 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 2479
***************************************


home help back first fref pref prev next nref lref last post