[25592] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7836 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 27 09:05:44 2005

Date: Sun, 27 Feb 2005 06:05:25 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 27 Feb 2005     Volume: 10 Number: 7836

Today's topics:
        [ANNOUNCE] PerlIO::via::Bzip2 <arjen@nospam.demon.nl>
        Defunct comp.lang.perl, was Re: OOP Tutorial <flavell@ph.gla.ac.uk>
        FBI Alert - Computer Virus washington2452@sbcglobal.net
    Re: FBI Alert - Computer Virus <nobull@mail.com>
        newbie: Perl IDE available?? <dhou@rohan.sdsu.edu>
    Re: newbie: Perl IDE available?? <todd@tdegruyl.com>
    Re: newbie: Perl IDE available?? <Juha.Laiho@iki.fi>
    Re: OOP Tutorial <leslievNO@SPAMicoc.co.za>
    Re: OOP Tutorial <leslievNO@SPAMicoc.co.za>
    Re: OOP Tutorial <nobull@mail.com>
    Re: OOP Tutorial <spamtrap@dot-app.org>
    Re: OOP Tutorial <lesliev@NOSPAMicoc.co.za>
    Re: OOP Tutorial <lesliev@NOSPAMicoc.co.za>
    Re: Perl web design <tadmc@augustmail.com>
    Re: Perl web design <nospam@bigpond.com>
    Re: Pure Perl OpenSSL Library <dkm@kataplop.net>
        The meaning of @ <leslievNO@SPAMicoc.co.za>
    Re: The meaning of @ <newspost@kohombanDELETE.net>
    Re: The meaning of @ <pilkowsk@informatik.uni-marburg.de>
    Re: The meaning of @ <lesliev@NOSPAMicoc.co.za>
    Re: Wide character notation, was Re: How to NOT use utf <nobull@mail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 26 Feb 2005 20:14:49 GMT
From: Arjen Laarhoven <arjen@nospam.demon.nl>
Subject: [ANNOUNCE] PerlIO::via::Bzip2
Message-Id: <ICKKrz.1x1D@zorch.sf-bay.org>

Hi, 

I'd like to announce the release of PerlIO::via::Bzip2 to the world.
>From the documentation:


NAME
    PerlIO::via::Bzip2 - PerlIO::via layer for Bzip2 (de)compression

SYNOPSIS
        # Read a bzip2 compressed file from disk.
        open(my $fh, "<:via(Bzip2)", "compressed_file");
        my $uncompressed_data = <$fh>;

        # Compress data on-the-fly to a bzip2 compressed file on disk.
        open(my $fh, ">:via(Bzip2)", "compressed_file");
        print {$fh} $uncompressed_data;

DESCRIPTION
    This module implements a PerlIO layer which will let you handle bzip2
    compressed files transparently.

[...]

COPYRIGHT AND LICENSE
    Copyright (C) 2005 by Arjen Laarhoven

    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.


Enjoy,

Arjen




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

Date: Sun, 27 Feb 2005 10:31:39 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Defunct comp.lang.perl, was Re: OOP Tutorial
Message-Id: <Pine.LNX.4.61.0502271011230.11863@ppepc56.ph.gla.ac.uk>

On Sun, 27 Feb 2005, Leslie Viljoen wrote:

> Brian McCauley wrote:
> >  > I hear comp.lang.perl is defunct.
> > 
> > Er yes, rather a long time ago.
> 
> I wonder if there is any way to get people to stop carrying the 
> group then.

In practice, I suspect that would now be very hard; but if you want to 
discuss the issue, you'd be better off on the news.admin.* hierarchy 
regarding the necessary technical measures.  I think there's general 
agreement around here as to what the group's status is *meant* to be, 
but on Usenet, that isn't the whole story.  This could turn into a 
massive thread about Usenet administration, policy and techniques, 
with almost no relevance to the Perl language itself.

h t h


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

Date: 27 Feb 2005 00:23:48 -0800
From: washington2452@sbcglobal.net
Subject: FBI Alert - Computer Virus
Message-Id: <1109492628.358528.265670@z14g2000cwz.googlegroups.com>

FBI Alerts Public to Recent Email Scheme

The FBI warned the public to avoid falling victim to an on-going mass
e-mail scheme wherein computer users receive unsolicited e-mails
purportedly sent by the FBI.  The e-mails then direct recipients to
open an attachment and answer questions. The attachments contain a
computer virus.

To read the full text, please go to:
http://www.contactomagazine.com/emailscam0226.htm



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

Date: Sun, 27 Feb 2005 09:15:30 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: FBI Alert - Computer Virus
Message-Id: <cvs2pf$lii$1@sun3.bham.ac.uk>



washington2452@sbcglobal.net wrote:

> FBI Alerts Public to Recent Email Scheme

This has nothing to do with Perl.

If you took the time to individually debunk all the 100s current e-mail 
scams in every newsgroup then this would overwhelm any legitimate use of 
Usenet.  Please, do not help the pranksers and scam artists destroy our 
cyber-communities.

> The FBI warned the public to avoid falling victim to an on-going mass
> e-mail scheme wherein computer users receive unsolicited e-mails
> purportedly sent by the FBI.

That's a waste of time.  The public need to understand that they should 
not fall for unsolicited mail scams _regardless_ of from whom they are 
purportedly sent.



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

Date: Sun, 27 Feb 2005 05:14:40 +0000 (UTC)
From: hou <dhou@rohan.sdsu.edu>
Subject: newbie: Perl IDE available??
Message-Id: <cvrl00$sd6$1@gondor.sdsu.edu>

Hi everyone,
   I am new to Perl and I am looking for some nice and
   free IDE?  I've found that Eclipse is a quite nice
   tool for Java developers.  I wonder if there's a
   equvalent one for Perl programmers.  I have read some
   threads talking about the Emacs V.S. Vi.  I wonder that
   is it a tradition perl programmers don't use IDE?  No
   offend, every language has its own way to do thing, just
   curious what is the tradition in this particular case.
   Thanks 
   Dean


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

Date: Sun, 27 Feb 2005 00:25:26 -0600
From: Todd de Gruyl <todd@tdegruyl.com>
Subject: Re: newbie: Perl IDE available??
Message-Id: <slrnd22pum.5rf.todd@ibook.local>

On 2005-02-27, hou <dhou@rohan.sdsu.edu> wrote:
> Hi everyone,
>    I am new to Perl and I am looking for some nice and
>    free IDE?  I've found that Eclipse is a quite nice
>    tool for Java developers.  

If you like eclipse, you can try:
http://e-p-i-c.sourceforge.net/

which basically sets up a perl mode in eclipse.  

-- 
Todd de Gruyl


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

Date: Sun, 27 Feb 2005 07:33:44 +0000 (UTC)
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: newbie: Perl IDE available??
Message-Id: <cvrt4o$kep$1@ichaos.ichaos-int>

hou <dhou@rohan.sdsu.edu> said:
>I am new to Perl and I am looking for some nice and free IDE? I've
>found that Eclipse is a quite nice tool for Java developers. I
>wonder if there's a equvalent one for Perl programmers. I have read
>some threads talking about the Emacs V.S. Vi. I wonder that is it a
>tradition perl programmers don't use IDE? No offend, every language has
>its own way to do thing, just curious what is the tradition in this
>particular case.

I'd say perl is not so hard on the developer as Java is -- and thus
the tools needed with perl are much more lightweight than those
needed with Java. Contrasts:
- perl has no separate compilation phase
- with perl there (usually) is less hassle with finding classes (Java
  classloader issues can be a pain)
- in perl, class/method names tend to be shorter, thus giving less to gain
  from auto-completion

So, the mostly needed support tool is another window to use for reading
perldoc documentation. These from my point of view, but then, I'm more
accustomed to perl than to Java.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: Sun, 27 Feb 2005 11:58:49 +0200
From: Leslie Viljoen <leslievNO@SPAMicoc.co.za>
Subject: Re: OOP Tutorial
Message-Id: <oqCdnWQKxdp6BLzfRVn-1g@is.co.za>

Brian McCauley wrote:
>  > I hear comp.lang.perl is defunct.
> 
> Er yes, rather a long time ago.

I wonder if there is any way to get people to stop carrying the group 
then. There are definitely still posts there and I posted there for a
while before discovering this group.

> While not all OO systems have the concept of class I think it is worthy 
> of mention in the abstract part because so many do.  Actually you do not 
> introduce the concept of class at all before you use it.
Ok, I have introduced that.

> You could then mention that in most OO systems inheritance is between 
> classes not objects.
And in Perl it is also between classes right? I suppose its a
debatable point.

> I'm glad to see you 'use strict' in your examples, in a contemporary 
> tutiorial you should 'use warnings' rather then utilize the -w switch.
OK, done.

> You describe the scope of the package directive incorrectly.
Because package only functions within the enclosing block, right?
Ok, fixed that.

> The -> calls methods not subroutines.  Actually they are the same thing 
> but to call a subroutine in a package (non-OO style) you just use a 
> namespace qualified call.
This I am unsure about. I have tried calling package subroutines with
package::run() - but it doesn't seem to work. Can you give an example
of a working namespace qualified call?

Also, the -> works for packages where no object has been instantiated
with bless. So doesn't that mean it works in a non-OO environment too?

> You mention the ability to manipuate package variables from outside way 
> too soon.  Package variables as part of the package API should only be 
> use for things like DEBUG flags.
That's because I am starting with a non-OO perspective when introducing
packages for the first time. I guess I could put a note that using 
package variables like that is not advisable?

> Your examples use package names with lower case names contrary to the 
> normal conventions.
The examples in the Perl Programming book use camel caps I see. Is that 
the convention? If so, does this convention work in windows? I suppose
Perl would ignore the filename case - I just don't have Active State 
Perl here to test...

> Your example .pm files have #! lines - meaningless and confusing.
True, will fix that.

> In your narrative you talk of using an implicit return in modules but in 
> your examples you use an explicit one (contrary to normal conventions).
Ah yes, fixed that too.

Thanks again for the help!
Les


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

Date: Sun, 27 Feb 2005 12:37:46 +0200
From: Leslie Viljoen <leslievNO@SPAMicoc.co.za>
Subject: Re: OOP Tutorial
Message-Id: <Fa6dnSjTqIyXPrzfRVn-pw@is.co.za>


> To carry on...
> 
> Using the term 'our variable' to mean 'package variable' is slang. 
> There's nothing (IMHO) wrong with using it so long as when you introduce 
> the slang term you also proint out the proper term.
Ok, I cleared that up.

> You use the term 'constructor' where you mean 'class method' in the 
> phrase 'when a method is not a constructor, the first parameter given to 
> it is not the class, but the blessed object'.

> Calling a constuctor on an existing object is generally considered a BAD 
> THING.  Having a constuctor that can be called on an existing object and 
> does something other than act as a (copy) constructor is an even worse 
> thing. [...] I now see that that you go on to talk about copy 
> constructors. IMNSHO you should not mention the idea that a constructor 
> could also be a instance method until you get to talking about copy 
> constructors.
> 
>     print "address: ".$objectref->{address}."\n";
> 
> is more idiomatically
> 
>     print "address: $objectref->{address}\n";
Ok. I have had interpolation fail on me so I am by default wary of it 
when I stick complicated things in strings.

> "If we don't want a copy constructor, we can make simple constructors 
> that can be called from both packages and objects like this"... but it's 
> bad form to do so, so don't do it.
I actually took that example from "Programming Perl" on p294, - 
"Dual-nature methods". Why is it bad form?
I will look into the whole copy constructor thing. I see John has 
comments on that too.

> Using the name super_animal of a subclass of animal is confusing. (Since 
> SUPER is also used to mean parent class).
I agree. At the risk of sounding corny, I have changed it to 
mega_animal! SUPER is a bit of a funny choice for an ancestor though, 
isn't it? Expecially since descendants are most often more "super" than
their parents.

> The constuct base an rebless paradigm is usually the wrong one.
> 
>    # 'Wrong'
>    $objref = animal->new ($name);    # Construct base
>    return bless ($objref, $class);
> 
>    # 'Right'
>    $objref = $class->SUPER::new($name)
>    return $objref;
> 
> The difference is that if animal::new internally calls any instance 
> methods that are overridden in super_animal then in the 'Wrong' example 
> animal::new will call the methods in animal:: rather than in 
> super_animal::.  Usually this is the wrong thing.  Occasionally it is 
> the right thing in which case the explict construct base and rebless 
> becomes the right thing.
Rebless? duh, I don't know that word! Its also not in my manual's pretty
comprehensive glossary - but I see Google knows it so I'll check out
what you are saying here.

Oh, I think I get it. But can you give more code examples?

> You say of DESTROY 'If we define it, it will be called when an object 
> goes out of scope.'  This is wrong - it is when there are nolonger any 
> references to the object.  This may be when the variable holding the 
> last serviving reference goes out of scope, then again it may not.
Ok. I have been a bit more specific, I said:
If we define it, it will be called when there are no remaining 
references to the object. That normally will happen when the program 
ends or the block terminates – unless you have another reference to the 
object stashed away somewhere.

Is that better?

Les


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

Date: Sun, 27 Feb 2005 11:10:18 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: OOP Tutorial
Message-Id: <cvs9gn$ojh$1@sun3.bham.ac.uk>



Leslie Viljoen wrote:

[ Attibution to Brian McCauley missing ]

>> "If we don't want a copy constructor, we can make simple constructors 
>> that can be called from both packages and objects like this"... but 
>> it's bad form to do so, so don't do it.
> 
> I actually took that example from "Programming Perl" on p294, - 
> "Dual-nature methods". 

Sometimes it's useful to have dual-nature methods but making all 
methods, or just all constuctors dual nature by habit is bad.

 > Why is it bad form?

More code, less tight API for no gain.

 > SUPER is a bit of a funny choice for an ancestor though,
> isn't it? Expecially since descendants are most often more "super" than
> their parents.

Super means "above".  Have you ever seen a family tree?  These are 
usually drawn the wrong way up for a real tree with the trunk at the top 
and the branches at the bottom.

>> The constuct base an rebless paradigm is usually the wrong one.
>>
>>    # 'Wrong'
>>    $objref = animal->new ($name);    # Construct base
>>    return bless ($objref, $class);
>>
>>    # 'Right'
>>    $objref = $class->SUPER::new($name)
>>    return $objref;
>>
>> The difference is that if animal::new internally calls any instance 
>> methods that are overridden in super_animal then in the 'Wrong' 
>> example animal::new will call the methods in animal:: rather than in 
>> super_animal::.  Usually this is the wrong thing.  Occasionally it is 
>> the right thing in which case the explict construct base and rebless 
>> becomes the right thing.
> 
> Rebless? duh, I don't know that word!

In English the prefix re- can be applied to any verb to mean "do again". 
  So to rebless is to bless again that which is already blessed.

 > Oh, I think I get it. But can you give more code examples?

When a class has a complicated constructor that constuctor may be split 
into several parts that can be overridden separately in subclasses.

package Animal;

sub init_legs {
   # Do stuff for initialising the legs of an animal
}

sub new {
   my $class = shift;
   my $self = bless {}, $class;
   $self->init_legs;
   $self;
}

package Specialized_Animal;

sub init_legs {
   my $self = shift;
   $self->SUPER::init_legs;
   # Do additional stuff for initializing the legs of Specialized_Animal
}

>> You say of DESTROY 'If we define it, it will be called when an object 
>> goes out of scope.'  This is wrong - it is when there are nolonger any 
>> references to the object.  This may be when the variable holding the 
>> last serviving reference goes out of scope, then again it may not.
> 
> Ok. I have been a bit more specific, I said:
> If we define it, it will be called when there are no remaining 
> references to the object. That normally will happen when the program 
> ends or the block terminates – unless you have another reference to the 
> object stashed away somewhere.
> 
> Is that better?

Yes, much.  But I still think 'the block' may be rather unclear.

I think you should hybidise this with the original.

'In the simplest case this will happen when the variable holding the 
reference to the object goes out of scope.'

There are so many exceptions to this that there is no point mentioning 
any of them unless you are really going to cover the subject properly. 
After all it may not be that there's another reference to the object, it 
may be there's another reference to the variable containing the 
reference. The global destruction phase is a topic in itself.  An you 
can't properly talk about reference counting without also mentioning 
circular references, weakened references and closures.




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

Date: Sun, 27 Feb 2005 07:28:01 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: OOP Tutorial
Message-Id: <1_GdnbtAZM9PIbzfRVn-qg@adelphia.com>

Leslie Viljoen wrote:

> Brian McCauley wrote:
> 
>> The -> calls methods not subroutines.  Actually they are the same thing
>> but to call a subroutine in a package (non-OO style) you just use a
>> namespace qualified call.
> This I am unsure about. I have tried calling package subroutines with
> package::run() - but it doesn't seem to work. Can you give an example
> of a working namespace qualified call?

    #!/usr/bin/perl

    use warnings;
    use strict;

    package Foo;
    sub say_something {
        my ($msg) = @_;
        print $msg;
    }

    package main;
    Foo::say_something("Hello, world!\n");

This illustrates Brian's point: When you use :: syntax, you're making an
ordinary non-OO subroutine call. The name of the package is *not* passed as
the first argument.

> Also, the -> works for packages where no object has been instantiated
> with bless. So doesn't that mean it works in a non-OO environment too?

No, it just means you're calling a class method. In a class method, the
first argument is a string with the name of the class:

    #!/usr/bin/perl

    use warnings;
    use strict;

    package Foo;
    sub say_something {
        my ($class, $msg) = @_;
        print "$msg from $class!\n";
    }

    package main;
    Foo->say_something('Hello');

Once again, this highlights Brian's point: You can't call a method with ::,
nor can you call a non-OO sub with ->. If you try to, a different number of
arguments is passed than expected, with the expected arguments at the wrong
indices within @_.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Sun, 27 Feb 2005 14:42:49 +0200
From: Leslie Viljoen <lesliev@NOSPAMicoc.co.za>
Subject: Re: OOP Tutorial
Message-Id: <ffOdndjOtfbYXbzfRVn-vQ@is.co.za>

Hi Brian

Ok, looking at your rebless paradigm earlier:

    # 'Wrong'
    $objref = animal->new ($name);    # Construct base
    return bless ($objref, $class);

    # 'Right'
    $objref = $class->SUPER::new($name)
    return $objref;


I have done this now, with the original animal class calling the run method.
I can see that it would be a good idea for the new mega_animal's new
to indirectly call its own run method - and this works fine, except that
mega_animal's run makes use of the num_eyes variable that is not yet
initialised:

(in mega_animal.pm)

sub run {
     my $obj = shift;
     my $name = $obj->{name};
     print "$name running extremely quickly and looking around with ".
         $obj->{num_eyes}." eyes in super_animal!\n";
}

sub new {
     my $class_or_obj = shift;
     my $class = ref ($class_or_obj) || $class_or_obj;

     my ($name, $objref, $num_eyes);

     if (!($name = shift)) { $name = "Blatsnork"; }

     #$objref = animal->new ($name);    # Old construct base - calls old 
run method

     # calls animal->new which calls run method above which uses unset vars!
     $objref = $class->SUPER::new($name);

     if (!($num_eyes = shift)) { $num_eyes = 2; }
     print "Super animal new - eyes: $num_eyes\n";

     $objref->{num_eyes} = $num_eyes;

     return bless ($objref, $class);
}


So the problem is that I need to set a variable in my hashref, but the 
new creates
that hashref so I can't do that. In this case would I have a system of 
passing in
the hashref I want the constructor to use when it does the bless? Or 
would this be
a case where I don't use SUPER?

I suppose this problem would only apply to a constructor since other 
methods would
find our constructor had run and the proper variables had been created 
by the time they run.


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

Date: Sun, 27 Feb 2005 14:51:50 +0200
From: Leslie Viljoen <lesliev@NOSPAMicoc.co.za>
Subject: Re: OOP Tutorial
Message-Id: <H-qdnftocPT6X7zfRVn-iA@is.co.za>

>> Rebless? duh, I don't know that word!

> In English the prefix re- can be applied to any verb to mean "do again". 
>  So to rebless is to bless again that which is already blessed.

And I had read plenty about blessing objects again.
I was reading reb-less, not re-bless - now I really feel a bit dim.

As in the Jack Handey deep thought:
Maybe in order to understand mankind, we have to look at the word 
itself: "Mankind". Basically, it's made up of two separate words - 
"mank" and "ind". What do these words mean ? It's a mystery, and that's 
why so is mankind.


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

Date: Sat, 26 Feb 2005 23:27:11 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl web design
Message-Id: <slrnd22mhf.6ht.tadmc@magna.augustmail.com>

IRR <iotarhorho@REM0VEhotmail.com> wrote:

> are there things I can do with a website knowing a good bit about Perl 
> that I might not be able to do otherwise? 


No.

There are lots and lots of things that you can do with a website
knowing how to program that you might not be able to do otherwise.

(your choice of programming language doesn't really matter much.)


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 27 Feb 2005 17:00:57 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Perl web design
Message-Id: <38d9haF5n9b6hU2@individual.net>

IRR wrote:

> May not be a well posed question, but I thought I'd give it a try....
> 
> I've been programming in Perl for some time, pretty applied stuff though,
> and I've recently started becoming interested in website design.  I'm
> interested in examples or ideas of how to use Perl to make a better
> website, i.e. are there things I can do with a website knowing a good bit
> about Perl
> that I might not be able to do otherwise?  Can anyone recommend maybe
> example websites and/or a few good books or online tutorials for getting
> my feet wet?

1. Mason http://www.masonhq.com/
2 My speedup tips:
http://www.gregorytoomey.com/index.php?option=content&task=view&id=2&Itemid=2

gtoomey


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

Date: Sun, 27 Feb 2005 12:35:52 +0100
From: "Marc" <dkm@kataplop.net>
Subject: Re: Pure Perl OpenSSL Library
Message-Id: <4221b08a@epflnews.epfl.ch>

Big and Blue <No_4@dsl.pipex.com> writes:

> Marc wrote:
>  >
>> This will be behind an Apache server. I first wrote the test system
>> using Python, but Perl is widely used here, so I must use it ;)
>
>     You missed my point.  Perl is an option, not a requirement.

Yes and no. If I want to make some script with apache and use some
languages used in my "team", there's not much left ;)

>>>    My suspicion is that if you are worried about the cost of forking
>>>then you're looking at the wrong thing.
>> ..... You are right. But if I just want to get some some field from
>> the
>> certificates, forking is a bit heavy for this... But I will investigate
>> this. Thanks for the remark ;)
>
>     Forking isn't *that* heavy.  However, modules such as
> IO::Socket::SSL do certificate verification, so perhaps you could look
> through that to see how it does it?  Presumably to verify it it must
> look at the certificate fields.

My system will receive burst of thousand and more request within short
period (seconds/minutes), so I want to avoid forks as much as possible.

>     So, write a simple Perl module which does this before calling openssl....
>     ...and which then parses stderr and returns the status.

I'm already doing this. But for example, if openssl returned something
else than 0 when there is a problem, it would be easier than parse
undocumented output from stderr ;)

>     Waiting for someone to do it?  Are you volunteering?

Not waiting for someone to do it, asking if someone knows about this
sort a project. I'm afraid I'm not skilled enougth in Perl and don't
have time for writing such a thing, so I'll use what's already existing.


Thanks,
Marc


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

Date: Sun, 27 Feb 2005 12:09:33 +0200
From: Leslie Viljoen <leslievNO@SPAMicoc.co.za>
Subject: The meaning of @
Message-Id: <coidnfLRX9b3AbzfRVn-rw@is.co.za>

Hello!

I have been trying to figure out one of Abigail's JAPH
signatures (check http://www.cpan.org/misc/japh):

#!/usr/bin/perl -lw
eval {die [[qq [Just another Perl Hacker]]]};;
print
${${${@}}[$#{@{${@}}}]}
          [$#{${@{${@}}}
                 [$#{@{${@}}}]}]

This is the center of the expression in a few places: ${@}
Are we dereferencing the @? What does the @ on its own mean?
The Programming Perl manual I have makes no reference to this
shorthand and Google and Altavista don't seem to search on
punctuation.

I have tried printing ${@} and @, but I get nothing.
Presumeably the die puts the error message in the @ in some
format.

Can someone please explain?

Les


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

Date: Sun, 27 Feb 2005 18:30:31 +0800
From: GreenLeaf <newspost@kohombanDELETE.net>
Subject: Re: The meaning of @
Message-Id: <38dlspF5oonrfU1@individual.net>

Leslie Viljoen wrote:
> Hello!
> 
> I have been trying to figure out one of Abigail's JAPH
> signatures (check http://www.cpan.org/misc/japh):
>
> Can someone please explain?
> 
> Les

Didn't she answer this same question from you once, a few days back? :o)



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

Date: Sun, 27 Feb 2005 13:23:51 +0100
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: The meaning of @
Message-Id: <MPG.1c8bda3fcf38400e9898b4@news.individual.de>

Leslie Viljoen schrieb:
>=20
> I have been trying to figure out one of Abigail's JAPH
> signatures (check http://www.cpan.org/misc/japh):
>=20
> #!/usr/bin/perl -lw
> eval {die [[qq [Just another Perl Hacker]]]};;
> print
> ${${${@}}[$#{@{${@}}}]}
>           [$#{${@{${@}}}
>                  [$#{@{${@}}}]}]
>=20
> This is the center of the expression in a few places: ${@}
> Are we dereferencing the @? What does the @ on its own mean?
> The Programming Perl manual I have makes no reference to this
> shorthand and Google and Altavista don't seem to search on
> punctuation.

In Perl, you can write a var $foo as ${foo}. In some situations this=20
will be a handy abbrev e.g. in "${foo}bar" instead of $foo.'bar'. So=20
your questionable construct ${@} is simply the var $@. Have a look to=20
`perldoc perlvar` to learn more about $@. Consider the content of the=20
first pair of square brackets in Abigail's print-statement:

    $#{ @{ ${@} } }
           `--=B4
            just the var $@
        `-------=B4
         dereferencing its value (seems to be an arrayref)
    `-------------=B4
     getting this arrays highest index

I hope these steps will help you to understand that funny code.

regards,
fabian


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

Date: Sun, 27 Feb 2005 14:56:06 +0200
From: Leslie Viljoen <lesliev@NOSPAMicoc.co.za>
Subject: Re: The meaning of @
Message-Id: <FvKdnWrcxa7vXrzfRVn-vw@is.co.za>

GreenLeaf wrote:
> Leslie Viljoen wrote:
> 
>> Hello!
>>
>> I have been trying to figure out one of Abigail's JAPH
>> signatures (check http://www.cpan.org/misc/japh):
>>
>> Can someone please explain?
>>
>> Les
> 
> 
> Didn't she answer this same question from you once, a few days back? :o)
> 
Sorry I missed it. Thunderbird does not seem to highlight threads I
have posted in.

Fabian's reply was great though anyway.

Les


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

Date: Sun, 27 Feb 2005 09:39:40 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Wide character notation, was Re: How to NOT use utf8.
Message-Id: <cvs46p$m47$1@sun3.bham.ac.uk>



Alan J. Flavell wrote:

> If we code "\x{0100}\x{DF}\n" (that's "A macron, sharp s"), then Perl 
> *knows* that we need Unicode, and will store a unicode string 
> (which, as we know, is stored internally in its utf8 format).

> So I don't really understand that:
> 
>   "produces a fairly useless mixture of native bytes and UTF-8"
> 
> which is quoted above.  What's *wrong* (as I see it) with what's 
> quoted above is that there is an attempt to output a "wide" Unicode 
> character (A macron, \x{100}) without the proper arrangements having 
> been made.

Yes, it would appear that the feature to which the documentation is 
referring (putting raw bytes into a UTF8 string with \x{}) was decided 
to be of negledgible utility and was removed but the documentation has 
not caught up.



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

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 V10 Issue 7836
***************************************


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