[31952] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3215 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 22 11:09:28 2010

Date: Mon, 22 Nov 2010 08: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, 22 Nov 2010     Volume: 11 Number: 3215

Today's topics:
        Email::MIME on Debian <usenet05@drabble.me.uk>
    Re: Email::MIME on Debian <hjp-usenet2@hjp.at>
    Re: FAQ 2.17 What is perl.com? Perl Mongers? pm.org? pe <brian.d.foy@gmail.com>
        Finding if something is in a list <dave@invalid.invalid>
    Re: Finding if something is in a list <tadmc@seesig.invalid>
    Re: Finding if something is in a list <dave@invalid.invalid>
    Re: Finding if something is in a list <tadmc@seesig.invalid>
    Re: Finding if something is in a list <willem@turtle.stack.nl>
        FLV::Info perl module not working as hoped <me@invalid.org>
        How to uninstall packages installed by cpan? <pengyu.ut@gmail.com>
        neat cool perl module I wrote tonight <r@thevoid1.net>
    Re: on windows 7 / cygwin / perl / cpan - cannot instal <emailsrvr-groups@yahoo.com>
    Re: on windows 7 / cygwin / perl / cpan - cannot instal <emailsrvr-groups@yahoo.com>
    Re: Perl command-line: check for XML well-formedness <r@thevoid1.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 21 Nov 2010 19:22:34 GMT
From: Graham Drabble <usenet05@drabble.me.uk>
Subject: Email::MIME on Debian
Message-Id: <Xns9E37C51B2CE69grahamdrabblelineone@ID-77355.user.dfncis.de>

Hi,

I've been developing on Windows using ActivePerl 5.10.0 and the 
Email::MIME that is installed by ppm (which turns out to be 1.906).

For production the scripts will run on a Debian machine running perl 
5.10.0. The sysadmin of that server loaded Email::MIME by installing 
libemail-mime-creator-perl (+ dependencies). It appears that this has 
installed Email::MIME version 1.861 which does not provide the body_str 
method.

Am I safe to simly download 1.906 from CPAN and install using perl 
Makefile.pl and then make or will that lead to me having two 
incompatible versions around? If the latter what would be the 
recommended path?

-- 
Graham Drabble
http://www.drabble.me.uk/


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

Date: Sun, 21 Nov 2010 23:28:13 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Email::MIME on Debian
Message-Id: <slrniej77t.78q.hjp-usenet2@hrunkner.hjp.at>

On 2010-11-21 19:22, Graham Drabble <usenet05@drabble.me.uk> wrote:
> I've been developing on Windows using ActivePerl 5.10.0 and the 
> Email::MIME that is installed by ppm (which turns out to be 1.906).
>
> For production the scripts will run on a Debian machine running perl 
> 5.10.0. The sysadmin of that server loaded Email::MIME by installing 
> libemail-mime-creator-perl (+ dependencies). It appears that this has 
> installed Email::MIME version 1.861 which does not provide the body_str 
> method.
>
> Am I safe to simly download 1.906 from CPAN and install using perl 
> Makefile.pl and then make or will that lead to me having two 
> incompatible versions around? If the latter what would be the 
> recommended path?

If you just use cpan to install Email::MIME, it will installed into a
separate path from the .deb. The cpan-installed package will be found
first, so that should be ok, unless some software depends on the old
behaviour.

The sysadmin will probably be happier if he gets an up-to-date debian
package instead of having a wild mixture of debian-installed and
cpan-installed packages, so you might want to take a look at
http://debian.pkgs.cpan.org/#doing_it_yourself (or refer your sysadmin
to it).

	hp

PS: On Debian Squeeze, Email::MIME is at version 1.903, so updating to
Squeeze might be another option (it's still in testing but already
frozen).


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

Date: Mon, 22 Nov 2010 06:49:20 +0200
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
Message-Id: <221120100649206743%brian.d.foy@gmail.com>

In article <0q5dr7-sm9.ln1@zem.masonsmusic.co.uk>, Justin C
<justin.1010@purestblue.com> wrote:

> > No, it is not, and use.perl.org is also in a new, stable state.
> 
> Not sure about that above line, this is from the top of the use.perl.org
> web-page:
> 
> NOTE: use Perl; is on undef hiatus. You can read content, but you can't
> post it. More info will be forthcoming forthcomingly.

It says that, but it's never coming back. I have it from the horse's
mouth.


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

Date: Mon, 22 Nov 2010 09:33:59 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Finding if something is in a list
Message-Id: <fV45K0OBJxbE-pn2-wlzRDsdyYL3C@localhost>

I am processing records, one field of which is a "book number" this is
the "book" that the item belongs to. However it can belong to  
multiple books. So the field can either be "1" or a semi colon 
separated list "1;5;7" for example.

I want a simple test to see if an item belongs to a given book. Pseudo
code: "next if list does not contain book #".

Assuming $req holds the requested book number and $books holds the 
string of books, two ways I have come up with that work are:

next if $books !~ m/^$req$|^$req;|;$req;|;$req$/; 

or

next if  ! grep { $req == $_ } split /;/, $books;

Neither of which I am that pleased with. Is there a better way?

TIA
-- 
Regards
Dave Saville


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

Date: Mon, 22 Nov 2010 06:46:59 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Finding if something is in a list
Message-Id: <slrniekq40.ef4.tadmc@tadbox.sbcglobal.net>

Dave Saville <dave@invalid.invalid> wrote:
> I am processing records, one field of which is a "book number" this is
> the "book" that the item belongs to. However it can belong to  
> multiple books. So the field can either be "1" or a semi colon 
> separated list "1;5;7" for example.
>
> I want a simple test to see if an item belongs to a given book. Pseudo
> code: "next if list does not contain book #".
>
> Assuming $req holds the requested book number and $books holds the 
> string of books, two ways I have come up with that work are:
>
> next if $books !~ m/^$req$|^$req;|;$req;|;$req$/; 
>
> or
>
> next if  ! grep { $req == $_ } split /;/, $books;
>
> Neither of which I am that pleased with. Is there a better way?


    next unless $books =~ /(^|;)$req(;|$)/;


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


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

Date: Mon, 22 Nov 2010 13:06:01 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: Finding if something is in a list
Message-Id: <fV45K0OBJxbE-pn2-cTgoSous4gfS@localhost>

On Mon, 22 Nov 2010 12:46:59 UTC, Tad McClellan <tadmc@seesig.invalid>
wrote:

> Dave Saville <dave@invalid.invalid> wrote:
> > I am processing records, one field of which is a "book number" this is
> > the "book" that the item belongs to. However it can belong to  
> > multiple books. So the field can either be "1" or a semi colon 
> > separated list "1;5;7" for example.
> >
> > I want a simple test to see if an item belongs to a given book. Pseudo
> > code: "next if list does not contain book #".
> >
> > Assuming $req holds the requested book number and $books holds the 
> > string of books, two ways I have come up with that work are:
> >
> > next if $books !~ m/^$req$|^$req;|;$req;|;$req$/; 
> >
> > or
> >
> > next if  ! grep { $req == $_ } split /;/, $books;
> >
> > Neither of which I am that pleased with. Is there a better way?
> 
> 
>     next unless $books =~ /(^|;)$req(;|$)/;

That's neat Tad - Thank you.
-- 
Regards
Dave Saville


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

Date: Mon, 22 Nov 2010 08:37:02 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Finding if something is in a list
Message-Id: <slrniel0ib.eli.tadmc@tadbox.sbcglobal.net>

Tad McClellan <tadmc@seesig.invalid> wrote:
> Dave Saville <dave@invalid.invalid> wrote:

>> So the field can either be "1" or a semi colon 
>> separated list "1;5;7" for example.

>> Assuming $req holds the requested book number and $books holds the 
>> string of books,

>     next unless $books =~ /(^|;)$req(;|$)/;


If the data is exactly as you have described, then even this will do it:


    next unless $books =~ /\b$req\b/;


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


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

Date: Mon, 22 Nov 2010 15:51:11 +0000 (UTC)
From: Willem <willem@turtle.stack.nl>
Subject: Re: Finding if something is in a list
Message-Id: <slrniel4bf.1u1h.willem@turtle.stack.nl>

Dave Saville wrote:
) I am processing records, one field of which is a "book number" this is
) the "book" that the item belongs to. However it can belong to  
) multiple books. So the field can either be "1" or a semi colon 
) separated list "1;5;7" for example.
)
) I want a simple test to see if an item belongs to a given book. Pseudo
) code: "next if list does not contain book #".
)
) Assuming $req holds the requested book number and $books holds the 
) string of books, two ways I have come up with that work are:
)
) next if $books !~ m/^$req$|^$req;|;$req;|;$req$/; 
)
) or
)
) next if  ! grep { $req == $_ } split /;/, $books;
)
) Neither of which I am that pleased with. Is there a better way?

One trick to do this is this:

  next if ";$books;" !~ m/;$req;/;


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


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

Date: 21 Nov 2010 23:48:28 GMT
From: Greg Russell <me@invalid.org>
Subject: FLV::Info perl module not working as hoped
Message-Id: <8ktpe9FletU1@mid.individual.net>

I used CPAN to install the FLV::Info module with the intent of using the 
flv2swf perl script to convert *.flv files to *.swf, but am meeting with 
an error that I don't know how to solve:

$ flv2swf Aircraft_Engine_Failure_IMC.flv test.swf
Failed to read FLV file: Tag size is too small (4) at byte 932 (0x3a4) 
at /usr/local/share/perl/5.10.1/FLV/Tag.pm line 81.

The referenced line is:

 ...
79 if ($datasize < 11)
80 {
81 die "Tag size is too small ($datasize) at byte " . $file->get_pos(-10);
82 }
 ...

Yet:

ffmpeg -i Aircraft_Engine_Failure_IMC.flv Aircraft_Engine_Failure_IMC.swf

works correctly.

How to fix the Perl solution, please?


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

Date: Sun, 21 Nov 2010 07:41:26 -0800 (PST)
From: Peng Yu <pengyu.ut@gmail.com>
Subject: How to uninstall packages installed by cpan?
Message-Id: <112236c2-5b9c-40c2-b1fa-c3eef9b02a08@j21g2000vba.googlegroups.com>

I used cpan to install some packages. But it seems that these
installations are not compatible with macports' installation.
Therefore, I want to remove cpan's installation. I only see 'i' as
installation in the manpage of cpan. But I don't see how to remove a
cpan module. Would you please let me know what command to use for
removal?

Regards,
Peng


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

Date: Sun, 21 Nov 2010 03:34:33 -0800 (PST)
From: Robin <r@thevoid1.net>
Subject: neat cool perl module I wrote tonight
Message-Id: <b6dd784e-9e9f-4197-b62b-e3ab80631917@d20g2000yqg.googlegroups.com>

http://www.thevoid1.net/viegt/

yea,

enjoy...

-r


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

Date: Mon, 22 Nov 2010 02:51:21 -0800 (PST)
From: SVCitian <emailsrvr-groups@yahoo.com>
Subject: Re: on windows 7 / cygwin / perl / cpan - cannot install Math::Prime::XS
Message-Id: <89f5dba3-4ec2-4ee9-a32c-975f1ccb7e51@d8g2000yqf.googlegroups.com>

On Nov 20, 3:16=A0pm, sisyphus <sisyphus...@gmail.com> wrote:
> On Nov 20, 3:22=A0am,SVCitian<emailsrvr-gro...@yahoo.com> wrote:
>
> > I am unable to install the module: Math::Prime::XS
>
> [snip]
>
> > Warning: ExtUtils::CBuilder not installed or no compiler detected
>
> Could it be that the *real* reason it won't build is that
> ExtUtils::CBuilder is missing ?
>
> Cheers,
> Rob

I did try to install that separately.. and restarted cygwin.

ExtUtils::CBuilder installed without any errors.. But, then again when
I tried to install the Math::Prime::XS... the messages comes back
again.

Please help.


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

Date: Mon, 22 Nov 2010 07:06:40 -0800 (PST)
From: SVCitian <emailsrvr-groups@yahoo.com>
Subject: Re: on windows 7 / cygwin / perl / cpan - cannot install Math::Prime::XS
Message-Id: <d39e3dd9-2f70-44ca-8670-6d88825a0807@fj16g2000vbb.googlegroups.com>

On Nov 22, 5:51=A0pm, SVCitian <emailsrvr-gro...@yahoo.com> wrote:
> On Nov 20, 3:16=A0pm, sisyphus <sisyphus...@gmail.com> wrote:
>
> > On Nov 20, 3:22=A0am,SVCitian<emailsrvr-gro...@yahoo.com> wrote:
>
> > > I am unable to install the module: Math::Prime::XS
>
> > [snip]
>
> > > Warning: ExtUtils::CBuilder not installed or no compiler detected
>
> > Could it be that the *real* reason it won't build is that
> > ExtUtils::CBuilder is missing ?
>
> > Cheers,
> > Rob
>
> I did try to install that separately.. and restarted cygwin.
>
> ExtUtils::CBuilder installed without any errors.. But, then again when
> I tried to install the Math::Prime::XS... the messages comes back
> again.
>
> Please help.

Today when I got back home... this is what I have to prove that
ExtUtils::CBuilder is there..

Please see below..

And, I tried to install Math::Prime::XS again.. again the same issue
about ExtUtils::CBuilder and the other messages first posted.



$ cpan

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> install ExtUtils::CBuilder
CPAN: Storable loaded ok (v2.20)
Going to read '/home/User/.cpan/Metadata'
  Database was generated on Fri, 19 Nov 2010 07:42:44 GMT
CPAN: LWP::UserAgent loaded ok (v5.835)
CPAN: Time::HiRes loaded ok (v1.9719)
Fetching with LWP:
  ftp://mirrors.issp.co.th/cpan/authors/01mailrc.txt.gz
CPAN: YAML loaded ok (v0.71)
Going to read '/home/User/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.02)
 ...........................................................................=
 .DONE

Fetching with LWP:
  ftp://mirrors.issp.co.th/cpan/modules/02packages.details.txt.gz
Going to read '/home/User/.cpan/sources/modules/
02packages.details.txt.gz'
  Database was generated on Mon, 22 Nov 2010 07:30:30 GMT
 ...........................................................................=
 .DONE

Fetching with LWP:
  ftp://mirrors.issp.co.th/cpan/modules/03modlist.data.gz
Going to read '/home/User/.cpan/sources/modules/03modlist.data.gz'
 ...........................................................................=
 .DONE

Going to write /home/User/.cpan/Metadata
ExtUtils::CBuilder is up to date (0.2703).

cpan[2]>



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

Date: Sun, 21 Nov 2010 04:12:14 -0800 (PST)
From: Robin <r@thevoid1.net>
Subject: Re: Perl command-line: check for XML well-formedness
Message-Id: <7f6deff0-8f0c-4397-b174-26b992fd4365@p1g2000yqm.googlegroups.com>

probably, but try writing your own command line validator :-)
-r

luca wrote:
> Hi everyone, is there a way to check that an XML file is well formed with
> command line Perl?
>
> Thanks


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3215
***************************************


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