[30853] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2098 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 5 15:49:42 2009

Date: Mon, 5 Jan 2009 00:09:07 -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           Mon, 5 Jan 2009     Volume: 11 Number: 2098

Today's topics:
    Re: Installing a module written in C on a UNIX without  xhoster@gmail.com
    Re: mail address validation <g_m@remove-comcast.net>
    Re: mail address validation <hjp-usenet2@hjp.at>
    Re: mail address validation <stoupa@practisoft.cz>
    Re: mail address validation <g_m@remove-comcast.net>
    Re: mail address validation <g_m@remove-comcast.net>
        new CPAN modules on Mon Jan  5 2009 (Randal Schwartz)
        Update Based on -M <screwmeblome@gmail.com>
    Re: Update Based on -M <anfi@onet.eu>
    Re: Update Based on -M <news123@free.fr>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 04 Jan 2009 23:06:58 GMT
From: xhoster@gmail.com
Subject: Re: Installing a module written in C on a UNIX without root access
Message-Id: <20090104180751.635$BS@newsreader.com>

hamidrezah@yahoo.com wrote:
> > > '.../Algorithm-Combinatorics-0.25/blib/a
> rch/
> > > auto/Algorithm/Combinatorics/Combinatorics.so' for module
> >
> > Again, three dots in the path to the .so file. Do you know where
> > those are coming from?
> >

> The dots are added by me, the path were too long.

Can you manually find a file named Combinatorics.so?  If so, where is it
compared to where Perl wants it to be?

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: Sun, 4 Jan 2009 18:14:33 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: mail address validation
Message-Id: <eoOdndNJ1ZYA3_zUnZ2dnUVZ_qvinZ2d@giganews.com>


"Petr Vileta "fidokomik"" <stoupa@practisoft.cz> wrote in message news:ggu7di$1qdp$1@ns.felk.cvut.cz...
> smallpond wrote:
>> On Nov 29, 11:38 am, "Petr Vileta \"fidokomik\""
>>> My questions are:
>>>
>>> 1) what characters are forbidden in "user" part
>>> 2) what characters are forbidden in "domain" part
>>> 3) are allowed single character top level domains, say "example.o" ?
>>>
>>> Many thanks for any explanation.
>>
>>
>> You want to reinvent the wheel and not just use the CPAN module?  ok
>>
>> http://ex-parrot.com/~pdw/Mail-RFC822-Address.html
>
> I have read this but regexp on this page return true for user@domain By my opinion this is invalid mail address because TLD 
> part missing.

~~~~~~~~~~~~~~~~
If "TLD" meand "top level domain", then I'm guessing that you really are
just talking about syntax (as in whether user@domain is invalid because
it's not more like user@domain.com) and not sematics (as in:
"Please note that there is no way to determine whether an address
is deliverable without attempting delivery" - Email::Valid doc )

~~
I maybe can say a few things about this.

First of all, RFC2822  "obsoletes 822".

Second, I don't know what's what with these things,
but it seemed to me that RFC1036
(here: http://www.cs.tut.fi/~jkorpela/rfc/1036.html )
and "son of RFC1036"
(here: http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html )
are clearer and maybe more authoritative than some others.

In particular, for what I needed, this
http://www.cs.tut.fi/~jkorpela/rfc/1036.html#2.1.1
quote:
   Thus, the three permissible forms are:
      From: mark@cbosgd.ATT.COM
      From: mark@cbosgd.ATT.COM (Mark Horton)
      From: Mark Horton <mark@cbosgd.ATT.COM>

together with the note that the characters < > @ ( )
aren't syntactic if they're escaped (with \ ) or occur
in quotes ("..."), was good enought for what I needed.
Or at least I think it is.

~~~
So here's what I needed ....

I'm re-doing a newsgroup archive.
And I needed to parse the From header lines in order
1) to create a "safe" From line, with the domain part of the addresses
    replaced by '...', in order to protect the authors from bot harvesting, and
2) to extract the friendly name, such as is normally displayed in e-mail readers.
(using the 'local' from local@domain as the friendly name if there isn't a proper one.)

(The "safe" From lines will be displayed in tooltips behind the
friendly names, to better help people identify a particular author
among the few who happen to be using the same friendly name)

So anyway, this (below) is what I got so far.

I read somewhere that (one? some?)  of the Mail programs isn't very good
dealing with escaped and quoted characters in these things.
And as long as I was trying to deal with them via the regular expressions,
I wasn't getting anywhere either. But then it occured to me
(which is the thing I'm proudest of) to simply temporarily remove them
at the begining and replace them at the end.
Which is what Protect() and Unprotect() do.

~~~

What'd be good for me is if somebody happens to have a lot of strangely
formed From lines lying to test the script on.
Or if anybody can think of ways to improve and correct it.

thanks,
~greg



~~~~~~~~~~~~~~~~~~~~~~~~~~~~

use strict;
$|=1;

  # The three permissible forms are said to be:

  #  From: mark@cbosgd.ATT.COM
  #  From: mark@cbosgd.ATT.COM (Mark Horton)
  #  From: Mark Horton <mark@cbosgd.ATT.COM>

  # That is:

  # local@domain
  # local@domain (name)
  # friendly <local@domain>

  # I take a liberal approach that may match malformed cases,
  # but doesn't miss any well-formed ones.

  # In particular, the <...local..@..domain..> as matched here
  # will be the left-most instance of a < that's followed by
  # no < or > or @,
  # and then by @,
  # and then by no < or @,
  # and then by >.

  # Everything outside that is regarded as friendly name.
  # (Or this way seems to me to make the most sense
  # out of a few encountered odd addresses such as ...<<<local@domain>>>...
  # and others...


my @pro;

sub Protect
{
  # replace all \-escaped characters and quoted "..." stretches
  # with numbered escapes \e0\e, \e1\e, ...
  # (were \e = escape (ESC) = dec 27 = hex 1B
  #   which shouldn't naturally occur in any e-mail)
  # so that, in particular, escaped \" \< \@ \> \(  \)
  # won't be confused with syntacticly active " < @ > ( )

  my $s = shift;
  @pro = ();

  while( $$s =~ /^([^\\]*)(\\.)(.*)$/ )
  {
    # save and replace each \. with \e0\e, \e1\e, etc
    push @pro, $2;
    $$s = "$1\e$#pro\e$3";   }

  while($$s =~ /^([^"]*)("[^"]*")(.*)$/)
  {
    # save and replace each quoted stretch "..." with \e2\e, \e3\e, etc
    push @pro, $2;
    $$s = "$1\e$#pro\e$3";
  }

}

sub Unprotect
{
  # restores protected escaped characters and quoted stretches.
  my $s = shift;
  $s =~ s/\e(\d+)\e/$pro[$1]/g;
  return $s;

  # you can Protect() a line,
  # and then break it up into parts,
  # and then Unprotect() each part separately,
  # so long as the parts don't break up any of the \e\d+\e codes.
}

sub Trim
{
  # simply trims all leading and trailing spaces and quoting characters " < > [ ] ( )
  # (whether or not they're balanced)
  my $s = shift;
  $s =~ s/^[\s\(\)\[\]<>"]+//;
  $s =~  s/[\s\(\)\[\]<>"]+$//;
  return $s;
}


sub ParseFrom
{
  my $from = shift;
  Protect(\$from);


  my $safe;
  my $name;

  if($from =~ /^(.*?)<([^<>@]*)@([^>@]*)>(.*)$/)
  {
    # ..1..<..2..@..3..>..4..
    # ..friendly..<..local..@..domain..>..friendly..
    $safe = Unprotect( "$1<$2@...>$4" );
    $name = Unprotect( Trim($1) );
    $name = Unprotect( Trim($4) ) if $name eq '';
    $name = Unprotect( Trim($2) ) if $name eq '';
    return ($safe,$name);
  }

  if($from =~ /^([^@]*)@([^\s\(]*)(.*)$/)
  {
    # ..1..@..2.. ..3..
    # ..local..@..domain.. ..friendly..
    $safe = Unprotect( "$1@...$3" );
    $name = Unprotect( Trim($3) );
    $name = Unprotect( Trim($1) ) if $name eq '';
    return ($safe,$name);
  }

  # can't parse
  $from = Unprotect($from);
  return ($from,$from);

}


sub Test
{
  foreach my $line (<DATA>)
  {
    chomp $line;
    next if $line =~ /^\s*$/;
    print "$line\n";
    my ($safe,$name) = ParseFrom($line);
    print "$safe\n";
    print "$name\n";
    print "\n";
  }
}

Test();


__DATA__
mark@cbosgd.ATT.COM
mark@cbosgd.ATT.COM (Mark Horton)
Mark Horton <mark@cbosgd.ATT.COM>














 




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

Date: Mon, 5 Jan 2009 01:03:29 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: mail address validation
Message-Id: <slrngm2jii.d4s.hjp-usenet2@hrunkner.hjp.at>

[I'm unsure whether the quoting levels are correct. When I read ~greg's
posting I assumed that he was the OP, clarifying his problem. But
reading again, it looks like Petr is the OP? So I may be responding to
the wrong person]

On 2009-01-04 23:14, ~greg <g_m@remove-comcast.net> wrote:
> "Petr Vileta "fidokomik"" <stoupa@practisoft.cz> wrote in message news:ggu7di$1qdp$1@ns.felk.cvut.cz...
>> smallpond wrote:
>>> On Nov 29, 11:38 am, "Petr Vileta \"fidokomik\""
>>>> My questions are:
>>>>
>>>> 1) what characters are forbidden in "user" part
>>>> 2) what characters are forbidden in "domain" part
>>>> 3) are allowed single character top level domains, say "example.o" ?
>>>>
>>>> Many thanks for any explanation.
>>>
>>>
>>> You want to reinvent the wheel and not just use the CPAN module?  ok
>>>
>>> http://ex-parrot.com/~pdw/Mail-RFC822-Address.html
>>
>> I have read this but regexp on this page return true for user@domain By my opinion this is invalid mail address because TLD 
>> part missing.
>
> ~~~~~~~~~~~~~~~~
> If "TLD" meand "top level domain", then I'm guessing that you really are
> just talking about syntax (as in whether user@domain is invalid because
> it's not more like user@domain.com) and not sematics (as in:
> "Please note that there is no way to determine whether an address
> is deliverable without attempting delivery" - Email::Valid doc )
>
> ~~
> I maybe can say a few things about this.
>
> First of all, RFC2822  "obsoletes 822".

RFC 5322 obsoletes RFC 2822 and allows email addresses of the form
<localpart@tld>. So without "attempting delivery" (i.e. at least doing a
DNS lookup on "domain" and determining that there is no A or MX records
for "domain.") you cannot know that <user@domain> is invalid. 


> Second, I don't know what's what with these things,
> but it seemed to me that RFC1036
> (here: http://www.cs.tut.fi/~jkorpela/rfc/1036.html )
> and "son of RFC1036"
> (here: http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html )
> are clearer and maybe more authoritative than some others.

RFC 1036 is more strict than RFC 822 (and its successors). I.e., some
forms which would be legal in Email messages are not allowed in usenet
articles.

> In particular, for what I needed, this
> http://www.cs.tut.fi/~jkorpela/rfc/1036.html#2.1.1
> quote:
>    Thus, the three permissible forms are:
>       From: mark@cbosgd.ATT.COM
>       From: mark@cbosgd.ATT.COM (Mark Horton)
>       From: Mark Horton <mark@cbosgd.ATT.COM>
>
> together with the note that the characters < > @ ( )
> aren't syntactic if they're escaped (with \ ) or occur
> in quotes ("..."), was good enought for what I needed.
> Or at least I think it is.
>
> ~~~
> So here's what I needed ....
>
> I'm re-doing a newsgroup archive.
> And I needed to parse the From header lines in order
> 1) to create a "safe" From line, with the domain part of the addresses
>     replaced by '...', in order to protect the authors from bot harvesting, and
> 2) to extract the friendly name, such as is normally displayed in e-mail readers.
> (using the 'local' from local@domain as the friendly name if there isn't a proper one.)

I would suggest using Mail::Address for this task. You don't have to
"validate" email addresses for this (and you probably shouldn't - some
posters use invalid addresses on purpose, and an address which was valid
a few years ago might be invalid now), and Mail::Address should handle
the parsing, and return the "friendly name", local part and domain name.

	hp


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

Date: Mon, 5 Jan 2009 06:52:17 +0100
From: "Petr Vileta \"fidokomik\"" <stoupa@practisoft.cz>
Subject: Re: mail address validation
Message-Id: <gjs77c$2qes$2@ns.felk.cvut.cz>

Peter J. Holzer wrote:
> [I'm unsure whether the quoting levels are correct. When I read
> ~greg's posting I assumed that he was the OP, clarifying his problem.
> But reading again, it looks like Petr is the OP? So I may be
> responding to the wrong person]
>
> On 2009-01-04 23:14, ~greg <g_m@remove-comcast.net> wrote:
>> "Petr Vileta "fidokomik"" <stoupa@practisoft.cz> wrote in message
>> news:ggu7di$1qdp$1@ns.felk.cvut.cz...
>>> smallpond wrote:
>>>> On Nov 29, 11:38 am, "Petr Vileta \"fidokomik\""
>>>>> My questions are:
>>>>>
>>>>> 1) what characters are forbidden in "user" part
>>>>> 2) what characters are forbidden in "domain" part
>>>>> 3) are allowed single character top level domains, say
>>>>> "example.o" ?
>>>>>
>>>>> Many thanks for any explanation.
I resolve my problem partially but I still ned a final solution. I try to 
decribe problem in details.
I have a web form where visitor must type his/her mail address. For me is not 
important if typed mail address is working but if is formally right. It is 
because many visitors don't know to type anything without typos :-)
Examples of invalid mails typed by users:
some;user@example.com - semicolon instead of dot
some@user@example.com - two at signs
some.user@example - without TLD part (com, net, org ...)
user@example,com - comma instead of dot
and many many more :-)
For this reason I want to check mail before I store it to database and if needed 
then allert an user and ask to retype mail again.
-- 
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>



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

Date: Mon, 5 Jan 2009 01:53:53 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: mail address validation
Message-Id: <5tKdnZlpooCnM_zUnZ2dnUVZ_orinZ2d@giganews.com>


Peter J. Holzer  wrote >...
> [I'm unsure whether the quoting levels are correct. When I read ~greg's
> posting I assumed that he was the OP, clarifying his problem. But
> reading again, it looks like Petr is the OP? So I may be responding to
> the wrong person]

Right. I am the wrong person to be responding to.
At least if you expect me to be someone who really knows what I'm talking about. :)

Other than than that, you're right that I'm "~greg", and not the OP
(if that means "original poster". (I've been away from usenet awhile.))

> I would suggest using Mail::Address for this task. You don't have to
> "validate" email addresses for this (and you probably shouldn't - some
> posters use invalid addresses on purpose, and an address which was valid
> a few years ago might be invalid now), and Mail::Address should handle
> the parsing, and return the "friendly name", local part and domain name.
>
> hp
~~~~~~~~~~~~~~~~~~~

Thanks.

Ok.

So now I've played with Mail::Address awhile, and it may be just fine
for what I want. But there are definite problems with it.


I had considered using Mail::Address before, and the
Mail:: modules generally for re-doing the archive I mentioned.
But I decided against it for a number of reasons.

One great advantage of perl is, of course, its modules.
But there are times when trying to pick the right module,
and then trying to understand exactly what it does and how to use it
from its documentation becomes such an overwhelming task in itself,
that it far outweighing the original task. Which in this case was simply
parsing a line!

I was first alterted to Mail::Address problems by its own documentation.
Which I quote from: ...

    Mail::Address extracts and manipulates email addresses from a message header.
    It cannot be used to extract addresses from some random text.
    You can use this module to create RFC822 compliant fields.
    Although Mail::Address is a very popular subject for books, and is used in many applications,
    it does a very poor job on the more complex message fields.
    It does only handle simple address formats (which covers about 95% of what can be found).
    Problems are with
        no support for address groups, even not with the semi-colon as separator between addresses;
        limitted support for escapes in phrases and comments. There are cases where it can get wrong; and
        you have to take care of most escaping when you create an address yourself:
        Mail::Address does not do that for you.
    Often requests are made to the maintainers of this code improve this situation,
    but this is not a good idea, where it will break zillions of existing applications.
    If you wish for a fully RFC2822 compliant implementation you may take a look at
    the Mail::Message::Field::Full manpage, part of MailBox.


A priori to know for sure if this is the module to use
(which after all "covers about 95% of what can be found")
I would myself already have to understand the syntax of email addresses,
such as occur in the wild, sufficiently well that it'd already be a trivial matter
to parse them myself, without any module.

The only reason to use any module in a case like this is if you don't know
the syntax yourself, and are guarenteed, and can trust, that the module does.

Secondly, I was led away from the Mail:: modules by comments at the "Perl Email Project",
http://emailproject.perl.org/mediawiki/index.php/Main_Page

In particular "The Evolution of Perl Email Handling" article at
http://emailproject.perl.org/mediawiki/index.php/Articles
http://www.perl.com/pub/a/2004/06/10/email.html?page=2 #Address Handling

Quoting from that:

   The old favorite is Mail::Address. ....
   ...
   Unfortunately, like many of the mail modules, it tries really hard to be helpful.

        my ($addr) = Mail::Address->parse('"eBay, Inc." <support@ebay.com>');
        print $addr->name # Inc. eBay

~~~~

In other words Mail::Address actually converts "eBay, Inc" to "Inc. eBay".
(Just to be "helpful"!)

I had myself noticed that, for example, that it parses
    A\@B"the king"<C@D>E(F)G
as
->format: {A \ @ B "the king" E G <C@D> (F)}
->address: {C@D}
->comment: {(F)}
->phrase: {A \ @ B "the king" E G}
->host: {D}
->name: {A @ B "the king" E G}
->user: {C}


In other words it willy-nill inserts spaces where ever it feels like it.

And the only guarentee that an updated version of Mail::Address
won't do it all differently again is that "it will break zillions of existing applications" if it does.

(For my archive I use md5_hex signatures of From lines  and friendly names
in order to link to lists of authors' posts.
And it's important that I get this right from the start,
- so that I won't have to do it all over again, again. )

thanks for the suggestion though,
~greg

 




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

Date: Mon, 5 Jan 2009 02:29:35 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: mail address validation
Message-Id: <YKidnc3oI6gPK_zUnZ2dnUVZ_hqdnZ2d@giganews.com>


Petr Vileta "fidokomik" > wrote ...
>>>>>> My questions are:
>>>>>>
>>>>>> 1) what characters are forbidden in "user" part
>>>>>> 2) what characters are forbidden in "domain" part
>>>>>> 3) are allowed single character top level domains, say
>>>>>> "example.o" ?
>>>>>>
>>>>>> Many thanks for any explanation.
> I resolve my problem partially but I still ned a final solution. I try to decribe problem in details.
> I have a web form where visitor must type his/her mail address. For me is not important if typed mail address is working but 
> if is formally right. It is because many visitors don't know to type anything without typos :-)
> Examples of invalid mails typed by users:
> some;user@example.com - semicolon instead of dot
> some@user@example.com - two at signs
> some.user@example - without TLD part (com, net, org ...)
> user@example,com - comma instead of dot
> and many many more :-)
> For this reason I want to check mail before I store it to database and if needed then allert an user and ask to retype mail 
> again.



That way lies madness!

But I think section 5.2. here:
http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html#5.2

will -- in principle -- answer all your questions.

(interesting to note for example that:
    "Other forms of address MUST not be used.
        NOTE: "Other forms" specifically include UK-style "backward" domains
            ("uk.oxbridge.cs" is in the Czech Republic, not the UK),
        pure-UUCP addressing
            ("knee!shin!foot" instead of foot%shin@knee.uucp),
      and abbreviated domains
            ("zebra.zoo" instead of "zebra.zoo.toronto.edu").   "

So, again, that way lies madness,
if you insist on dealing with things like that.)


It is curious that the only really required headers of emails and posts
are the From line and a Date line, and that there be a blank line after
the headers. I mean, considering that importance, one would have thought
that people would have become a little kinder and consistent about how
they format their From and Date lines.

Your problem isn't the same as mine though.
I have an archive of what were sucessfully delivered posts,
and my problem isn't to decide if the From lines and addresses are
syntactically or semantically valid, or even make sense, but rather
to try to make at least some kind sense out of them, as given.





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

Date: Mon, 5 Jan 2009 05:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Jan  5 2009
Message-Id: <KCzH6o.1oK8@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.

Alien-GvaScript-1.11
http://search.cpan.org/~dami/Alien-GvaScript-1.11/
Gva extension to the prototype javascript framework 
----
Alien-Judy-0.08
http://search.cpan.org/~jjore/Alien-Judy-0.08/
A wrapper for installing the Judy library 
----
Audio-Ecasound-Multitrack-0.978
http://search.cpan.org/~ganglion/Audio-Ecasound-Multitrack-0.978/
Perl extensions for multitrack audio processing 
----
B-Hooks-EndOfScope-0.05
http://search.cpan.org/~flora/B-Hooks-EndOfScope-0.05/
Execute code after a scope finished compilation 
----
BDB-1.82
http://search.cpan.org/~mlehmann/BDB-1.82/
Asynchronous Berkeley DB access 
----
CPU-Z80-Assembler-2.02
http://search.cpan.org/~pscust/CPU-Z80-Assembler-2.02/
a Z80 assembler 
----
CPU-Z80-Assembler-2.03
http://search.cpan.org/~pscust/CPU-Z80-Assembler-2.03/
a Z80 assembler 
----
CPU-Z80-Assembler-2.04
http://search.cpan.org/~pscust/CPU-Z80-Assembler-2.04/
a Z80 assembler 
----
CPU-Z80-Assembler-2.05
http://search.cpan.org/~pscust/CPU-Z80-Assembler-2.05/
a Z80 assembler 
----
Catalyst-Authentication-Credential-HTTP-1.009
http://search.cpan.org/~bobtfish/Catalyst-Authentication-Credential-HTTP-1.009/
HTTP Basic and Digest authentication for Catalyst. 
----
Catalyst-Authentication-Credential-HTTP-Proxy-0.05
http://search.cpan.org/~bobtfish/Catalyst-Authentication-Credential-HTTP-Proxy-0.05/
HTTP Proxy authentication for Catlayst. 
----
DBIx-Connection-0.13
http://search.cpan.org/~adrianwit/DBIx-Connection-0.13/
Simple database interface. 
----
FabForce-DBDesigner4-0.13
http://search.cpan.org/~reneeb/FabForce-DBDesigner4-0.13/
Parse/Analyse XML-Files created by DBDesigner 4 (FabForce) 
----
FabForce-DBDesigner4-DBIC-0.07
http://search.cpan.org/~reneeb/FabForce-DBDesigner4-DBIC-0.07/
create DBIC scheme for DBDesigner4 xml file 
----
File-PackageIndexer-0.02
http://search.cpan.org/~smueller/File-PackageIndexer-0.02/
Indexing of packages and subs 
----
Finance-Bank-IE-0.16
http://search.cpan.org/~waider/Finance-Bank-IE-0.16/
----
Geo-WebService-Elevation-USGS-0.004
http://search.cpan.org/~wyant/Geo-WebService-Elevation-USGS-0.004/
Elevation queries against USGS web services. 
----
HTTP-Router-0.01
http://search.cpan.org/~masaki/HTTP-Router-0.01/
Yet Another Path Router for HTTP 
----
IO-Moose-0.0602
http://search.cpan.org/~dexter/IO-Moose-0.0602/
Reimplementation of IO::* with improvements 
----
Judy-0.11
http://search.cpan.org/~jjore/Judy-0.11/
Library for creating and accessing dynamic arrays 
----
Judy-0.12
http://search.cpan.org/~jjore/Judy-0.12/
Library for creating and accessing dynamic arrays 
----
KiokuDB-0.19
http://search.cpan.org/~nuffin/KiokuDB-0.19/
Object Graph storage engine 
----
KiokuDB-Backend-BDB-0.10
http://search.cpan.org/~nuffin/KiokuDB-Backend-BDB-0.10/
BerkeleyDB backend for KiokuDB. 
----
KiokuDB-Backend-DBI-0.05
http://search.cpan.org/~nuffin/KiokuDB-Backend-DBI-0.05/
DBI backend for KiokuDB 
----
KiokuDB-Backend-Files-0.04
http://search.cpan.org/~nuffin/KiokuDB-Backend-Files-0.04/
One file per object backend 
----
MojoMojo-0.999025
http://search.cpan.org/~mramberg/MojoMojo-0.999025/
A Catalyst & DBIx::Class powered Wiki. 
----
MooseX-Attribute-0.02
http://search.cpan.org/~ctbrown/MooseX-Attribute-0.02/
create extendable and reusable attributes 
----
MsOffice-Word-HTML-Writer-0.03
http://search.cpan.org/~dami/MsOffice-Word-HTML-Writer-0.03/
Writing documents for MsWord in HTML format 
----
MySQL-Slurp-0.2702
http://search.cpan.org/~ctbrown/MySQL-Slurp-0.2702/
Use PIPEs to write directly to a MySQL table 
----
Net-FreshBooks-API-0.01
http://search.cpan.org/~evdb/Net-FreshBooks-API-0.01/
easy OO access to the FreshBooks.com API 
----
Net-Stomp-Receipt-0.35
http://search.cpan.org/~huguei/Net-Stomp-Receipt-0.35/
An extension to Net::Stomp (STOMP client) to allow transactional sends. 
----
Padre-0.23
http://search.cpan.org/~szabgab/Padre-0.23/
Perl Application Development and Refactoring Environment 
----
Padre-Plugin-AcmePlayCode-0.06
http://search.cpan.org/~fayland/Padre-Plugin-AcmePlayCode-0.06/
Acme::PlayCode Plugin for Padre 
----
Padre-Plugin-CSS-0.04
http://search.cpan.org/~fayland/Padre-Plugin-CSS-0.04/
Padre and CSS 
----
Padre-Plugin-Encrypt-0.04
http://search.cpan.org/~fayland/Padre-Plugin-Encrypt-0.04/
encrypt/decrypt file in Padre 
----
Padre-Plugin-HTML-0.07
http://search.cpan.org/~fayland/Padre-Plugin-HTML-0.07/
Padre and HTML 
----
Padre-Plugin-HTMLExport-0.03
http://search.cpan.org/~fayland/Padre-Plugin-HTMLExport-0.03/
export highlighted HTML in Padre 
----
Padre-Plugin-JavaScript-0.24
http://search.cpan.org/~fayland/Padre-Plugin-JavaScript-0.24/
Padre and JavaScript 
----
Padre-Plugin-Perl6-0.020
http://search.cpan.org/~azawawi/Padre-Plugin-Perl6-0.020/
Padre plugin for Perl6 
----
Padre-Plugin-Perl6-0.021
http://search.cpan.org/~azawawi/Padre-Plugin-Perl6-0.021/
Padre plugin for Perl6 
----
Padre-Plugin-ViewInBrowser-0.05
http://search.cpan.org/~fayland/Padre-Plugin-ViewInBrowser-0.05/
view selected doc in browser for Padre 
----
Padre-Plugin-XML-0.04
http://search.cpan.org/~fayland/Padre-Plugin-XML-0.04/
Padre and XML 
----
SQL-Statement-1.16_04
http://search.cpan.org/~rehsack/SQL-Statement-1.16_04/
SQL parsing and processing engine 
----
Scope-Upper-0.03
http://search.cpan.org/~vpit/Scope-Upper-0.03/
Act on upper scopes. 
----
Spreadsheet-Read-0.31
http://search.cpan.org/~hmbrand/Spreadsheet-Read-0.31/
Read the data from a spreadsheet 
----
TeamCity-BuildMessages-v0.999.1
http://search.cpan.org/~elliotjs/TeamCity-BuildMessages-v0.999.1/
Encode and emit messages that TeamCity can interpret during a build. 
----
Test-DBUnit-0.18
http://search.cpan.org/~adrianwit/Test-DBUnit-0.18/
Database testing framework. 
----
Test-NeedsDisplay-1.07
http://search.cpan.org/~adamk/Test-NeedsDisplay-1.07/
Ensure that tests needing a display have one 
----
Test-NoTabs-0.5
http://search.cpan.org/~bobtfish/Test-NoTabs-0.5/
Check the presence of tabs in your project 
----
Text-FIGlet-2.02
http://search.cpan.org/~jpierce/Text-FIGlet-2.02/
a perl module to provide FIGlet abilities, akin to banner 
----
Text-FIGlet-2.03
http://search.cpan.org/~jpierce/Text-FIGlet-2.03/
a perl module to provide FIGlet abilities, akin to banner 
----
Tie-DNS-0.6
http://search.cpan.org/~diederich/Tie-DNS-0.6/
Tie interface to Net::DNS 
----
Tie-DNS-0.61
http://search.cpan.org/~diederich/Tie-DNS-0.61/
Tie interface to Net::DNS 
----
Time-HiRes-1.9719
http://search.cpan.org/~jhi/Time-HiRes-1.9719/
High resolution alarm, sleep, gettimeofday, interval timers 
----
URI-Template-Restrict-0.02
http://search.cpan.org/~masaki/URI-Template-Restrict-0.02/
restricted URI Templates handler 
----
WWW-TinySong-0.01
http://search.cpan.org/~miorel/WWW-TinySong-0.01/
Get free music links using TinySong 
----
WWW-TinySong-0.02
http://search.cpan.org/~miorel/WWW-TinySong-0.02/
Get free music links using TinySong 
----
WWW-TinySong-0.03
http://search.cpan.org/~miorel/WWW-TinySong-0.03/
Get free music links using TinySong 
----
XML-Parser-Wrapper-0.09
http://search.cpan.org/~dowens/XML-Parser-Wrapper-0.09/
A simple object wrapper around XML::Parser 
----
Xacobeo-0.05_02
http://search.cpan.org/~potyl/Xacobeo-0.05_02/
XPath (XML Path Language) visualizer. 
----
rgit-0.06
http://search.cpan.org/~vpit/rgit-0.06/
Recursively execute a command on all the git repositories in a directory tree. 


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: Sun, 4 Jan 2009 09:40:07 -0800 (PST)
From: "zoomcart.com" <screwmeblome@gmail.com>
Subject: Update Based on -M
Message-Id: <309fd104-3b89-48df-8bc9-8dc7123af4d7@o4g2000pra.googlegroups.com>

I have user files i need to update if they haven't been updated since
01/03/09. the code i have below thinks they aren't old enough. what am
i doing wrong? thanks in advance for your help.

$oldage=(-M "members/$user/files/product.txt");
if ($oldage < "01/03/09") {
print qq~yep-it's older~;
&update;
}
else{
print qq~nope~;
}


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

Date: Sun, 04 Jan 2009 18:52:49 +0100
From: Andrzej Adam Filip <anfi@onet.eu>
Subject: Re: Update Based on -M
Message-Id: <2bshb5i778@rose.brudna.chmurka.net>

"zoomcart.com" <screwmeblome@gmail.com> wrote:

> I have user files i need to update if they haven't been updated since
> 01/03/09. the code i have below thinks they aren't old enough. what am
> i doing wrong? thanks in advance for your help.
>
> $oldage=(-M "members/$user/files/product.txt");
> if ($oldage < "01/03/09") {
>   print qq~yep-it's older~;
>   &update;
> }else{
>   print qq~nope~;
> }

-M return "age of file in days" counting from script start.

Use stat function to get file modification "time in unix format".
Use str2time funtion in Date::Parse module to convert "date string" into
"time in unix format".

-- 
[pl>en Andrew] Andrzej Adam Filip : anfi@onet.eu : anfi@xl.wp.pl
There's nothing remarkable about it.  All one has to do is hit the right
keys at the right time and the instrument plays itself.
  -- J. S. Bach


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

Date: Sun, 04 Jan 2009 20:14:27 +0100
From: News123 <news123@free.fr>
Subject: Re: Update Based on -M
Message-Id: <49610a92$0$15115$426a34cc@news.free.fr>

There's some problems with you attempt

1.) $oldage does not return the date as a string (see previous response
from Anfrzej

2.) Even if $oldage would return a string, then you had to make a string
comparison with lt and not a numerical comparison with '<'

3.) Performaing a string comparison on dates with the format 'mm/dd/yy'
would not compare correctly as for example
'01/04/08' lt '01/03/09' would return false, though it should be true.

tghe best format for date strings if you want to sort / compare is
something like 'yyyy-mm-dd'


You can use the module Time::Local to convert  a given date into
'seconds since the system epoch'
http://perldoc.perl.org/Time/Local.html


bye


N

zoomcart.com wrote:
> I have user files i need to update if they haven't been updated since
> 01/03/09. the code i have below thinks they aren't old enough. what am
> i doing wrong? thanks in advance for your help.
> 
> $oldage=(-M "members/$user/files/product.txt");
> if ($oldage < "01/03/09") {
> print qq~yep-it's older~;
> &update;
> }
> else{
> print qq~nope~;
> }


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

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 2098
***************************************


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