[30441] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1684 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 1 14:09:45 2008

Date: Tue, 1 Jul 2008 11:09:10 -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, 1 Jul 2008     Volume: 11 Number: 1684

Today's topics:
    Re: File size too big for perl processing <danieldharkness@gmail.com>
    Re: File size too big for perl processing <danieldharkness@gmail.com>
    Re: File size too big for perl processing xhoster@gmail.com
        My c code has stopped working: PL_errgv NULL? <petasis@iit.demokritos.gr>
    Re: My c code has stopped working: PL_errgv NULL? <fawaka@gmail.com>
    Re: My c code has stopped working: PL_errgv NULL? <petasis@iit.demokritos.gr>
    Re: My c code has stopped working: PL_errgv NULL? <petasis@iit.demokritos.gr>
    Re: My c code has stopped working: PL_errgv NULL? <fawaka@gmail.com>
    Re: My c code has stopped working: PL_errgv NULL? <petasis@iit.demokritos.gr>
    Re: perl + python tutorial available for download <benkasminbullock@gmail.com>
        Perl Audit Reports <ramadugugowtham@gmail.com>
        Perl Audit Reports <ramadugugowtham@gmail.com>
    Re: Perl Audit Reports <m@rtij.nl.invlalid>
        Perl CGI utilities? <nowhere@nowhere.com>
    Re: Perl CGI utilities? <nowhere@nowhere.com>
    Re: Perl CGI utilities? <fawaka@gmail.com>
    Re: Perl CGI utilities? (Time Waster)
    Re: Perl CGI utilities? <wahab@chemie.uni-halle.de>
    Re: Perl CGI utilities? <ben@morrow.me.uk>
    Re: Perl regular expression engine <tadmc@seesig.invalid>
        Time::HiRes hell... <Mark.Seger@hp.com>
    Re: Time::HiRes hell... <Mark.Seger@hp.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 1 Jul 2008 05:26:43 -0700 (PDT)
From: Cheez <danieldharkness@gmail.com>
Subject: Re: File size too big for perl processing
Message-Id: <cdba881b-4486-46c0-8772-395a9548bd5e@a70g2000hsh.googlegroups.com>

On Jun 30, 2:18=A0pm, Cheez <danieldharkn...@gmail.com> wrote:

> I have a big file of 16-letter words that I am using as "bait" to
> capture larger words in a raw data file. =A0I loop through all of the
> rawdata with a single word for 1) matches and 2) to associate the raw
> data with the word. =A0I then go to the next line in the word list and
> repeat.

I just want to thank Sherm, Jim and Xho for their generous code
snippets and suggestions. One overlying theme is the use of "strict"
and "warnings" and I will certainly add those to each script.

Regarding the actual problem to be solved with perl, I initially used
Xho's hash-based script.  Once I get this running I will report back
with the actual script.  Again thanks for everyone's input and
patience.  As a self-learner, these NGs are invaluable!

Thanks,
Dan


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

Date: Tue, 1 Jul 2008 05:30:08 -0700 (PDT)
From: Cheez <danieldharkness@gmail.com>
Subject: Re: File size too big for perl processing
Message-Id: <34aa657e-35fd-4924-8b57-869c7edd7e4a@27g2000hsf.googlegroups.com>

On Jun 30, 7:31=A0pm, Big and Blue <N...@dsl.pipex.com> wrote:

> The subject implies that you have a problem that is producing an E2BIG
> error (say a file > 2GB or, even, 2^63 bytes - that would be impressive).

Thanks for the comment.  I think I lacked the precision to properly
describe my issue but with only a simple modification of my subject -
File Size too Big for Badly Written Perl Script - we're getting
closer ;)

Thanks,
Dan


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

Date: 01 Jul 2008 16:19:17 GMT
From: xhoster@gmail.com
Subject: Re: File size too big for perl processing
Message-Id: <20080701121921.905$0i@newsreader.com>

Big and Blue <No_4@dsl.pipex.com> wrote:
> Cheez wrote:
> > Hi, I posted this to perl.beginners as well and will make sure
> > comments go to both groups.
>
> The subject implies that you have a problem that is producing an E2BIG
> error (say a file > 2GB or, even, 2^63 bytes - that would be impressive).

That was my first thought as well, but I still suspected the question would
be about something else, either memory or speed.

> In fact you seem to have an slow algorithm that you expect can be
> improved.  That is something very different.

I'd say it is close enough.  It isn't really reasonable to expect people
to know the answer before they post the question, and I'd say this subject
line is well above the median for the group.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Tue, 01 Jul 2008 17:15:48 +0300
From: Georgios Petasis <petasis@iit.demokritos.gr>
Subject: My c code has stopped working: PL_errgv NULL?
Message-Id: <g4de85$2odr$1@ulysses.noc.ntua.gr>

Hi all,

I have some code like the following:

char *code = "some perl code";
eval_pv(code, 0);
if (SvTRUE(ERRSV)) {
   // Get the error...
   msg = SvPV_nolen(ERRSV);
}

This code works wit 5.8, but now that I have upgraded to 5.10 
(ActivePerl) it crashes. The problem seems to be that PL_errgv
is NULL. How can I fix my code to not crash?

George


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

Date: Tue, 01 Jul 2008 16:54:48 +0200
From: Leon Timmermans <fawaka@gmail.com>
Subject: Re: My c code has stopped working: PL_errgv NULL?
Message-Id: <1782e$486a4538$89e0e08f$20012@news1.tudelft.nl>

On Tue, 01 Jul 2008 17:15:48 +0300, Georgios Petasis wrote:

> This code works wit 5.8, but now that I have upgraded to 5.10
> (ActivePerl) it crashes. The problem seems to be that PL_errgv is NULL.
> How can I fix my code to not crash?

Are you absolutely sure of that? PL_errgv being NULL is highly unlikely. 
Can you printf("PL_errgv = %p\n", PL_errgv) first? Are you sure you're 
not linking wrongly? (e.g. including headers from one version but linking 
against the library of another, that would cause these kinds of 
problems). 

Regards,

Leon


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

Date: Tue, 01 Jul 2008 17:58:04 +0300
From: Georgios Petasis <petasis@iit.demokritos.gr>
To: Leon Timmermans <fawaka@gmail.com>
Subject: Re: My c code has stopped working: PL_errgv NULL?
Message-Id: <486A45FC.60601@iit.demokritos.gr>

O/H Leon Timmermans έγραψε:
> On Tue, 01 Jul 2008 17:15:48 +0300, Georgios Petasis wrote:
> 
>> This code works wit 5.8, but now that I have upgraded to 5.10
>> (ActivePerl) it crashes. The problem seems to be that PL_errgv is NULL.
>> How can I fix my code to not crash?
> 
> Are you absolutely sure of that? PL_errgv being NULL is highly unlikely. 
> Can you printf("PL_errgv = %p\n", PL_errgv) first? Are you sure you're 
> not linking wrongly? (e.g. including headers from one version but linking 
> against the library of another, that would cause these kinds of 
> problems). 
> 
> Regards,
> 
> Leon

I have installed ActivePerl 5.10.0 (only) in my system.

And yes, PL_errgv is NULL. I have printed it, as I get a crash when it 
was used :-(

Loading dll...
perl::interp new..
PL_errgv: 00000000
executing command!
done!

Regards,

George


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

Date: Tue, 01 Jul 2008 18:12:11 +0300
From: Georgios Petasis <petasis@iit.demokritos.gr>
Subject: Re: My c code has stopped working: PL_errgv NULL?
Message-Id: <g4dhhr$p4l$1@ulysses.noc.ntua.gr>

O/H Georgios Petasis έγραψε:
> O/H Leon Timmermans έγραψε:
>> On Tue, 01 Jul 2008 17:15:48 +0300, Georgios Petasis wrote:
>>
>>> This code works wit 5.8, but now that I have upgraded to 5.10
>>> (ActivePerl) it crashes. The problem seems to be that PL_errgv is NULL.
>>> How can I fix my code to not crash?
>>
>> Are you absolutely sure of that? PL_errgv being NULL is highly 
>> unlikely. Can you printf("PL_errgv = %p\n", PL_errgv) first? Are you 
>> sure you're not linking wrongly? (e.g. including headers from one 
>> version but linking against the library of another, that would cause 
>> these kinds of problems).
>> Regards,
>>
>> Leon
> 
> I have installed ActivePerl 5.10.0 (only) in my system.
> 
> And yes, PL_errgv is NULL. I have printed it, as I get a crash when it 
> was used :-(
> 
> Loading dll...
> perl::interp new..
> PL_errgv: 00000000
> executing command!
> done!
> 
> Regards,
> 
> George

In general, what is the suggested way to eval a script from C, and get 
the error message if there is an error during execution?

George


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

Date: Tue, 01 Jul 2008 17:50:23 +0200
From: Leon Timmermans <fawaka@gmail.com>
Subject: Re: My c code has stopped working: PL_errgv NULL?
Message-Id: <534e6$486a523f$89e0e08f$20012@news1.tudelft.nl>

On Tue, 01 Jul 2008 17:58:04 +0300, Georgios Petasis wrote:

> O/H Leon Timmermans έγραψε:
> 
> I have installed ActivePerl 5.10.0 (only) in my system.
> 
> And yes, PL_errgv is NULL. I have printed it, as I get a crash when it
> was used :-(
> 
> Loading dll...
> perl::interp new..
> PL_errgv: 00000000
> executing command!
> done!
> 
> Regards,
> 
> George

Hi George,

Can you show me the code you use to initialize the interpreter? In 
particular: does it include a call to perl_parse()? Also, you said "I 
have some code like the following": Does this *exact* code also give 
exactly this error?

Regards,

Leon


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

Date: Tue, 01 Jul 2008 19:13:43 +0300
From: Georgios Petasis <petasis@iit.demokritos.gr>
To: Leon Timmermans <fawaka@gmail.com>
Subject: Re: My c code has stopped working: PL_errgv NULL?
Message-Id: <486A57B7.2020600@iit.demokritos.gr>

O/H Leon Timmermans έγραψε:
> On Tue, 01 Jul 2008 17:58:04 +0300, Georgios Petasis wrote:
> 
>> O/H Leon Timmermans έγραψε:
>>
>> I have installed ActivePerl 5.10.0 (only) in my system.
>>
>> And yes, PL_errgv is NULL. I have printed it, as I get a crash when it
>> was used :-(
>>
>> Loading dll...
>> perl::interp new..
>> PL_errgv: 00000000
>> executing command!
>> done!
>>
>> Regards,
>>
>> George
> 
> Hi George,
> 
> Can you show me the code you use to initialize the interpreter? In 
> particular: does it include a call to perl_parse()? Also, you said "I 
> have some code like the following": Does this *exact* code also give 
> exactly this error?
> 
> Regards,
> 
> Leon


Dear Leon,

You can find the complete code at: 
http://ellogon.svn.sourceforge.net/viewvc/ellogon/trunk/lib/tclperl-3.2/tclperl.c?revision=1&view=markup

Yes, I am using perl_parse():

PERL_SET_CONTEXT(my_perl);
perl_construct(my_perl);
perl_parse(my_perl, xs_init, 3, embedded, 0);
perl_run(my_perl);
eval_pv(code, 0);
SvTRUE(ERRSV); <- crash :-(

Regards,

George


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

Date: Tue, 1 Jul 2008 12:02:24 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: perl + python tutorial available for download
Message-Id: <g4d6cg$l1k$1@cgi-ml.accsnet.ne.jp>

On Mon, 30 Jun 2008 17:44:13 +0000, Jürgen Exner wrote:

> Xah <xahlee@gmail.com> wrote:
>>my perl and python tutorial
>>
>>http://xahlee.org/perl-python/index.html
>>
>>is now available for download for offline reading.
> 
> Why anyone would have the idea to mix two different langauges in one
> tutorial is beyond me.

It's an interesting idea to present two or more languages in parallel - 
it would assist someone going "sideways" from one language to another.

> And calling that web page a tutorial is a large stretch of imagination.
> It is a random collection of primitve code samples, organized roughly by
> area. No learning goals, no explanation of concepts, ...

I'm a big fan of code samples - most of my code starts as other people's 
code samples.

> Apparently you changed your ID to escape all the filters you have been a
> permanent guest to. This 'tutorial' confirms that this is the best place
> for you. So back you go again.

I'm not interested in Xah Lee's tutorials enough to check whether they're 
any good or not, but he does have some interesting things to say about 
Emacs.


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

Date: Tue, 1 Jul 2008 02:53:37 -0700 (PDT)
From: Kingmaker <ramadugugowtham@gmail.com>
Subject: Perl Audit Reports
Message-Id: <ea9cdfab-3cea-4df2-ae1e-41d3e512ae81@x19g2000prg.googlegroups.com>

I am new to perl . I need to write a perl script to generate an audit
report of a root directory and all subsequent sub-directories and
files under it, the report should be able to
1.  list any directories/files changes in size and content, addition,
deletion of any of them.
2.  It could be run for different location passing parameters.

the live example is:
we have all our pkgs installed on unix machine in some location ..
Here for eg., in /tmp if someone attempts to Insert/Update/Delete any
file(s) in any of the pkg/directory from this location we should get
an alert audit report.


Please help.


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

Date: Tue, 1 Jul 2008 02:54:00 -0700 (PDT)
From: Kingmaker <ramadugugowtham@gmail.com>
Subject: Perl Audit Reports
Message-Id: <97ce6334-b425-497d-ba83-1992e8c332d6@g16g2000pri.googlegroups.com>

I am new to perl . I need to write a perl script to generate an audit
report of a root directory and all subsequent sub-directories and
files under it, the report should be able to
1.  list any directories/files changes in size and content, addition,
deletion of any of them.
2.  It could be run for different location passing parameters.

the live example is:
we have all our pkgs installed on unix machine in some location ..
Here for eg., in /tmp if someone attempts to Insert/Update/Delete any
file(s) in any of the pkg/directory from this location we should get
an alert audit report.


Please help.


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

Date: Tue, 1 Jul 2008 12:25:44 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl Audit Reports
Message-Id: <pan.2008.07.01.10.25.44@rtij.nl.invlalid>

On Tue, 01 Jul 2008 02:53:37 -0700, Kingmaker wrote:

> I am new to perl . I need to write a perl script to generate an audit
> report of a root directory and all subsequent sub-directories and files
> under it, the report should be able to 1.  list any directories/files
> changes in size and content, addition, deletion of any of them.
> 2.  It could be run for different location passing parameters.
> 
> the live example is:
> we have all our pkgs installed on unix machine in some location .. Here
> for eg., in /tmp if someone attempts to Insert/Update/Delete any file(s)
> in any of the pkg/directory from this location we should get an alert
> audit report.

I use tripwire for this, there probably are others, but if you must do it 
in Perl, simpel matter of programming.

Think how you want store the state. CSV seems to me a good format, but 
you can also use a database like GDBM for instance. A DB is probably 
easier.

Use File::Find to iterate over the directory structure and on first run 
store the information, on subsequent runs report differences and possibly 
store the new situation.

Use Getopt::Long to parse the command line.

Audi reports should probably be just printed to stdout, run your script 
drom cron and let cron take care of mailing the result. But mailing from 
Perl is also trivial, several modules can do this for you.

Start writing and when you get stuck, read the posting guidelines (yes 
really, do that first!) and then ask for specific help with what you're 
stuck with at that moment.

HTH,
M4


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

Date: Tue, 1 Jul 2008 16:42:50 +0200 (CEST)
From: JWhite <nowhere@nowhere.com>
Subject: Perl CGI utilities?
Message-Id: <g4dfp9$i5v$1@aioe.org>

I have been doing Perl for years, but only as local programming.  That is
to say, I never had any reason to build web pages or other 'Net' stuff. 
Lately I have been playing with CGI on our local network as a way to
deliver applications without worrying about the OS on the other end. A
vendor can show up in our mostly Linux shop with a Mac, connect to the
inhouse server and never know the difference.  It works well enough that
we will be moving a lot of our utilities to CGI.

So it comes back to the fact that I am not a web programmer, yet.

My question, for Perl programmers who are, is what do you use as the
programming environment?  Writing raw CGI into your Perl is great for
learning, but there is probably a more productive way.  I know that there
isn't a "Perl on Rails" all-in-one type of suite yet, but there must be
productivity enhancing utilities available.

Perl-CGI seems to be the most popular, but opinions will be welcome.  My
search is just starting.

Thanks any
James W


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

Date: Tue, 1 Jul 2008 16:47:54 +0200 (CEST)
From: JWhite <nowhere@nowhere.com>
Subject: Re: Perl CGI utilities?
Message-Id: <g4dg2q$i5v$2@aioe.org>

> 
> Perl-CGI seems to be the most popular, but opinions will be welcome.  My
> search is just starting.
> 

Oops, I meant cgi.pm, not Perl-CGI.

 Thanks any
 James W


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

Date: Tue, 01 Jul 2008 17:05:00 +0200
From: Leon Timmermans <fawaka@gmail.com>
Subject: Re: Perl CGI utilities?
Message-Id: <7a968$486a479c$89e0e08f$20012@news1.tudelft.nl>

On Tue, 01 Jul 2008 16:42:50 +0200, JWhite wrote:

> My question, for Perl programmers who are, is what do you use as the
> programming environment?  Writing raw CGI into your Perl is great for
> learning, but there is probably a more productive way.  I know that
> there isn't a "Perl on Rails" all-in-one type of suite yet, but there
> must be productivity enhancing utilities available.

There are plenty of frameworks out there. Catalyst seems to be the one 
that's picking up the most steam right now. It gets bonus points for 
having a book about it (ISBN: 978-1847190956). Other options include 
Maypole, Jifty and a few others.

Leon


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

Date: Tue, 01 Jul 2008 15:14:08 GMT
From: bfc@fenway.UUCP (Time Waster)
Subject: Re: Perl CGI utilities?
Message-Id: <4Rrak.118$9W.64@trndny04>

In article <7a968$486a479c$89e0e08f$20012@news1.tudelft.nl>,
Leon Timmermans  <fawaka@gmail.com> wrote:
>
>
>On Tue, 01 Jul 2008 16:42:50 +0200, JWhite wrote:
>
>> My question, for Perl programmers who are, is what do you use as the
>> programming environment?  Writing raw CGI into your Perl is great for
>> learning, but there is probably a more productive way.  I know that
>> there isn't a "Perl on Rails" all-in-one type of suite yet, but there
>> must be productivity enhancing utilities available.
>
>There are plenty of frameworks out there. Catalyst seems to be the one 
>that's picking up the most steam right now. It gets bonus points for 
>having a book about it (ISBN: 978-1847190956). Other options include 
>Maypole, Jifty and a few others.
>
>Leon

Yes, it seems Catalyst is very popular.  But CGI::Application seemed
just right for my small needs, see:
http://www.perl.com/pub/a/2001/06/05/cgi.html	(small intro article)
http://www.perl.com/pub/a/2006/10/19/cgi_application.html (another intro)
http://www.perlfoundation.org/perl5/index.cgi?cgi_application (more of
a homepage for them, though i think there's another more official one)

I've knocked about a dozen interconnected pages having no web
experience at all (but I wanted to use Perl for the underlying logic).
You'll also probably use an HTML template engine and plenty of
direct CGI calls, but the framework helps with transitions from
page to page (runmodes).  Pretty low level, but I don't have anything
in the Perl world to compare it, too, only heavier weight JSP/Servlet
& Struts in the Java world.



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

Date: Tue, 01 Jul 2008 17:17:39 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: Perl CGI utilities?
Message-Id: <g4dhqj$lk2$1@nserver.hrz.tu-freiberg.de>

JWhite wrote:
> I have been doing Perl for years, but only as local programming.  

!!

> My question, for Perl programmers who are, is what do you use as the
> programming environment?  Writing raw CGI into your Perl is great for
> learning, but there is probably a more productive way.  I know that there
> isn't a "Perl on Rails" all-in-one type of suite yet, but there must be
> productivity enhancing utilities available.

Is your term 'CGI' meant as "I have only /cgi-bin/-style external
processes available and no Apache modules"?

If you control the server, I'd give HTML::Mason a shot. You
install the Package into your mod_perl enabled Apache (I can
post the necessary configuration steps and some hints if required).

After you have all up and running, you have a
lot of possibilities to get along.

You may then (as in PHP) intersperse plain HTML with Perl code,
use modules, use templates whatever. This is a powerful thing,
imho.

http://www.masonhq.com/docs/manual/
http://www.masonbook.com/

Regards

Mirco


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

Date: Tue, 1 Jul 2008 16:26:27 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Perl CGI utilities?
Message-Id: <3uupj5-av2.ln1@osiris.mauzo.dyndns.org>


Quoth JWhite <nowhere@nowhere.com>:
> 
> My question, for Perl programmers who are, is what do you use as the
> programming environment?  Writing raw CGI into your Perl is great for
> learning, but there is probably a more productive way.  I know that there
> isn't a "Perl on Rails" all-in-one type of suite yet, but there must be
> productivity enhancing utilities available.

Catalyst is, I believe, quite close to 'Perl on Rails' (I must admit
I've never used either Ruby or Rails). It requires a small amount of
effort to understand how it thinks before you start, but after that it
makes things very much simpler. One issue is that is has a lot of
dependancies, and can be a little slow to start up: for production use
it's certainly worth installing it as a FastCGI or mod_perl app rather
than using the CGI interface. If you have access to your web server
config file this is straightforward.

Ben

-- 
   Razors pain you / Rivers are damp
   Acids stain you / And drugs cause cramp.                    [Dorothy Parker]
Guns aren't lawful / Nooses give
  Gas smells awful / You might as well live.                   ben@morrow.me.uk


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

Date: Tue, 1 Jul 2008 06:45:52 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Perl regular expression engine
Message-Id: <slrng6k67g.alh.tadmc@tadmc30.sbcglobal.net>

Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "BM" == Ben Morrow <ben@morrow.me.uk> writes:
>
>  BM> Quoth Ricardo <rvelosoo@gmail.com>:
>  >> 
>  >> I was wondering if someone could point me some ref on what algorithms
>  >> are used by perl to find matches between regular expressions and
>  >> text?  Is it a dfa?
>
>  BM> No, it's a form of NFA, to allow capturing. The only real reference for
>  BM> the algorithms used by perl is reg{comp,exec}.c in the perl source, but
>  BM> I *really* wouldn't recommend starting there :). Find a good reference
>  BM> on POSIX regular expression implementations.
>
> and get the book mastering regular expressions. it doesn't show detailed
> algorithms but explains them well enough to learn about them. and it
> covers almost all major regex versions in many different programs.


See also:

   How Regexes Work:

      http://perl.plover.com/Regex/article.html

-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Tue, 01 Jul 2008 12:36:50 -0400
From: Mark Seger <Mark.Seger@hp.com>
Subject: Time::HiRes hell...
Message-Id: <g4dmf3$5tg$1@usenet01.boi.hp.com>

I'd posted a note on HiRes earlier but things seem to be getting more 
complicated.  Here are the facts as I understand them:

- versions of HiRes older than 1.91 call setitimer with the entire time 
interval as usecs even if > 1sec.  This is clearly in violation of the 
calling interface to setitimer, but with glibc versions <2.4 it still 
works correctly as I've been successfully using this for over 5 years.
- with glibc 2.4, you get random results if the time >4 seconds
- with glibc 2.5, you get failures but is seems only during boot!  I 
know this sounds odd, but I tried running a test that did alarms > 1 
second as an inet.d script and watched the console.  I got errors while 
the system was booting and once it finished, the error messages stopped.

If the answer were simply to install the right version of HiRes that 
wouldn't be so bad but it looks like a lot of current distros still ship 
an older version of HiRes and we are talking a lot of permutations.  I 
just submitted a bugzilla against rhel5.2 and they're going to try to 
get it addresses in 5.3 but I have no idea where else this is a problem.

Now for my problem - I have an open source performance monitoring tool 
called collectl if anyone cares - that uses HiRes.  If HiRes is present 
I use high resolution timers and if not there I just do sleeps.

I'm now starting to get bug reports against systems with glibc 2.5 on 
them and what I plan to do with my next release if check the versions of 
HiRes and glibc and if they're incompatible point the user to cpan and 
tell them to install a newer version of HiRes.  Seemed to work great 
until I tried to install a new version of HiRes.  When I did my 'make 
install', it told me:

[root@cag-dl585-01 Time-HiRes-1.9715]# make install
Files found in blib/arch: installing files in blib/lib into architecture 
dependent library tree
Writing 
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/Time/HiRes/.packlist
Appending installation info to 
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod

and I discovered I now have both the old and new version of HiRes 
installed.  But what really makes this awful when I try to use HiRes 
perl loads the older one.  Clearly it's a library search path issue but 
given this can run on any distro I can't make any assumptions about 
where the module actually gets installed.

I'm not sure what the best solution to this is.  Is there an easy way to 
remove the older version?  Ultimately I want to be able to tell users of 
my tool how to get HiRes properly installed and they may not even be 
perl users or developers so the solution needs to be very simple.

any helpful suggestions will be greatly appreciated.

-mark


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

Date: Tue, 01 Jul 2008 13:54:53 -0400
From: Mark Seger <Mark.Seger@hp.com>
Subject: Re: Time::HiRes hell...
Message-Id: <g4dr1e$ji5$1@usenet01.boi.hp.com>

> and I discovered I now have both the old and new version of HiRes 
> installed.  But what really makes this awful when I try to use HiRes 
> perl loads the older one.  Clearly it's a library search path issue but 
> given this can run on any distro I can't make any assumptions about 
> where the module actually gets installed.
> 
> I'm not sure what the best solution to this is.  Is there an easy way to 
> remove the older version?  Ultimately I want to be able to tell users of 
> my tool how to get HiRes properly installed and they may not even be 
> perl users or developers so the solution needs to be very simple.

I did have a thought though I admit it's pretty brute force - how about 
I just add a switch to collectl that removes all instances of HiRes so 
the user doesn't have to figure out what to do?  Then they can execute 
the 'make install' and not care where in the tree it gets installed into?

It looks like I'd need to delete the directories and their contents that 
match *linux-thread-multi/Time/HiRes.pm
match *linux-thread-multi/auto/Time/HiRes/

Would that work?
-mark


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

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


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