[24189] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6381 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 10 14:05:38 2004

Date: Sat, 10 Apr 2004 11:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 10 Apr 2004     Volume: 10 Number: 6381

Today's topics:
        Cannot compile Perl with -Dusethreads <holger@marzen.de>
    Re: CGI query - paths and locations <sandem_uk@yahoo.co.uk>
    Re: Design choice: subclassing or "supplementing" <jkrugman@yahbitoo.com>
    Re: File::Tail just...stops. <snowhare@nihongo.org>
    Re: File::Tail just...stops. (Randal L. Schwartz)
    Re: File::Tail just...stops. <snowhare@nihongo.org>
        freesource server control panel for linux server create <gp@nospm.hr>
    Re: freesource server control panel for linux server cr <nospam@bigpond.com>
    Re: freesource server control panel for linux server cr <nospam@bigpond.com>
    Re: How can this be done? <raisin@delete-this-trash.mts.net>
    Re: How can this be done? <xxala_qumsiehxx@xxyahooxx.com>
    Re: How can this be done? <uri@stemsystems.com>
        how to extract data from optional patterns? <samwun@hgcbroadband.com>
    Re: how to extract data from optional patterns? <postmaster@castleamber.com>
    Re: Perl Timer <tadmc@augustmail.com>
        Statement on Spam and VoteNader.org marty@votenader.org
        Tests fail in cpan, succeed manually <jkrugman@yahbitoo.com>
    Re: Tests fail in cpan, succeed manually <jwillmore@remove.adelphia.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 10 Apr 2004 16:33:24 GMT
From: Holger Marzen <holger@marzen.de>
Subject: Cannot compile Perl with -Dusethreads
Message-Id: <c597kk$5rb$1@bluebell.marzen.de>

I have an old Linux system that's based on libc5. When I compile a
standard Perl (5.8.1 or 5.8.3) then I have no problems. But
Sendmail::Milter wants a threaded Perl, so I did

sh Configure -Dusethreads -d

The "make" fails with

|make[1]: Leaving directory `/usr/src/perl-5.8.3'
|
|        Making DynaLoader (static)
|make[1]: Entering directory `/usr/src/perl-5.8.3/ext/DynaLoader'
|Can't locate ExtUtils/Command.pm in @INC (@INC contains:
|/usr/local/lib/perl5/5.8.3/i586-linux-thread-multi
|/usr/local/lib/perl5/5.8.3
|/usr/local/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi
|/usr/local/lib/perl5/site_perl/5.8.3
|/usr/local/lib/perl5/site_perl/5.8.1 /usr/local/lib/perl5/site_perl .).
|BEGIN failed--compilation aborted.
|make[1]: *** [blib/lib/.exists] Error 2
|make[1]: Leaving directory `/usr/src/perl-5.8.3/ext/DynaLoader'
|make config failed, continuing anyway...
|make[1]: Entering directory `/usr/src/perl-5.8.3/ext/DynaLoader'
|Can't locate ExtUtils/Command.pm in @INC (@INC contains:
|/usr/local/lib/perl5/5.8.3/i586-linux-thread-multi
|/usr/local/lib/perl5/5.8.3
|/usr/local/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi
|/usr/local/lib/perl5/site_perl/5.8.3
|/usr/local/lib/perl5/site_perl/5.8.1 /usr/local/lib/perl5/site_perl .).
|BEGIN failed--compilation aborted.
|make[1]: *** [blib/lib/.exists] Error 2
|make[1]: Leaving directory `/usr/src/perl-5.8.3/ext/DynaLoader'
|make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2

both with Perl 5.8.1 and 5.8.3. Is this a bug in the makefiles?
Is there a fix or workaround for this?


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

Date: Sat, 10 Apr 2004 11:19:09 +0100
From: "Sandem" <sandem_uk@yahoo.co.uk>
Subject: Re: CGI query - paths and locations
Message-Id: <oQPdc.55447$Id.7038@news-binary.blueyonder.co.uk>

Thankyou Gunnar

Yes the original designer was perhaps a little lacking in forward thinking.

As for configuration strings, well I had better start learning!

Catch you later

Jabber



"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:c5707c$2pgnkc$1@ID-184292.news.uni-berlin.de...
> Sandem wrote:
> > I have been asked to move a website from one hoster to another.
> > The original hoster has CGi scripts enabled on the root of the
> > website, the new hoster only has them enable on the cgi-bin
> > directory and will not enable in the root.
> >
> > My problem is that despite going through the cgi scripts and
> > include files when the scripts run i.e. index.cgi in the cgi-bin
> > directory the generated buttons to 'Home' and 'Shop' for instance
> > (index.cgi and shop.cgi) show that you will be running in the root
> > i.e. www.website.com/index.cgi instead of
> > www.website.com/cgi-bin/index.cgi
>
> If the scripts are decently designed, you should be able to fix it via
> a couple of configuration settings. Otherwise there is more work involved.
>
> > Am I missing something silly?
>
> The person who decided to run CGI scripts from the document root,
> without knowing that the site would never be moved to another shared
> server, sure missed something. It's common practice on shared servers
> to only allow CGI scripts in the cgi-bin.
>
> Btw, do you have a Perl question?
>
> -- 
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>




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

Date: Sat, 10 Apr 2004 15:43:23 +0000 (UTC)
From: J Krugman <jkrugman@yahbitoo.com>
Subject: Re: Design choice: subclassing or "supplementing"
Message-Id: <c594mr$91k$2@reader1.panix.com>

In <c575e7$q5$1@mamenchi.zrz.TU-Berlin.DE> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:

>J Krugman  <jkrugman@yahbitoo.com> wrote in comp.lang.perl.misc:
>> 
>> 
>> 
>> 
>> I have this class from CPAN (let's call it, creatively enough, Foo)
>> that suits me fine in almost every respect, except for one workhorse
>> method (say, bar) that I think could be significantly enhanced.
>> One possibility would be to create a subclass MyFoo of Foo just
>> for the purpose of overriding bar.

>Overriding base class methods is more than just replacement.  If
>the base class uses the overridden method internally, it will call
>the *overriding* method on objects from your (inheriting) class.
>This is what allows old code to call new code in OO, and it is at the
>heart of inheritance.

>>                                    Alternatively, I could have a
>> file FooSupplement.pm, in which I do something like
>> 
>>   use strict;
>>   use warnings;
>>   package Foo;
>>   {
>>     no warnings 'redefine';
>>     sub bar {
>>       # raise the bar to perfection 
>>     }
>>   }
>>   1;
>> 
>> Then, instead of using some subclass MyFoo, I use good ol' Foo
>> followed by "use FooSupplement".

>Boo!

>That's called "intrusion into Foo's living-room", and in languages less
>forgiving than Perl you can get shot for that.  Perl allows it, but
>it's only for emergencies, not for regular programming.

>> I *suppose* (please correct me if I'm wrong) that this is yet
>> another one of those choices that boils down to personal preference,
>> but I'd love to take a very informal poll on what programmers here
>> would typically prefer to do in such a situation.

>I don't think it is a matter of much choice.  If you can do what you
>need to do via inheritance, go that way.  You need very good reasons
>to change into someone else's name space, and you'd limit the access
>to the absolute minimum.  I don't think you have such a situation.

Many, many thanks.  I was definitely heading in a bad direction
there.

jill

-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.



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

Date: Sat, 10 Apr 2004 15:32:59 GMT
From: Benjamin Franz <snowhare@nihongo.org>
Subject: Re: File::Tail just...stops.
Message-Id: <Xns94C757085D24snowharenihongoorg@64.164.98.50>

google@agentsix.net (Don W.) wrote in 
news:d4013293.0404080801.6322d6db@posting.google.com:

> I wrote a program that would continuously dump the output of a file to
> syslog, using File::Tail and Tie::Syslog.  Problem is, after about two
> days of operation, the program just stops tailing -- it's still
> running, and if I strace it, I can see that the file is being
> stat()ed, but no data is being sent across the wire to the syslog
> server.  If I restart the program, it starts tailing again.

At a guess, your log is getting rotated. Leaving you tailing the _old_ (now 
static) log instead of the new one.


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

Date: 10 Apr 2004 08:44:18 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: File::Tail just...stops.
Message-Id: <861xmv25yl.fsf@blue.stonehenge.com>

*** post for FREE via your newsreader at post.newsfeed.com ***

>>>>> "Benjamin" == Benjamin Franz <snowhare@nihongo.org> writes:

Benjamin> At a guess, your log is getting rotated. Leaving you tailing
Benjamin> the _old_ (now static) log instead of the new one.

But File::Tail (at least recent versions) know about that kind of
stuff, and automatically close and reopen the log.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


 -----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
                  


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

Date: Sat, 10 Apr 2004 16:14:06 GMT
From: Benjamin Franz <snowhare@nihongo.org>
Subject: Re: File::Tail just...stops.
Message-Id: <Xns94C75E01A9C97snowharenihongoorg@64.164.98.50>

merlyn@stonehenge.com (Randal L. Schwartz) wrote in 
news:861xmv25yl.fsf@blue.stonehenge.com:

> *** post for FREE via your newsreader at post.newsfeed.com ***
> 
>>>>>> "Benjamin" == Benjamin Franz <snowhare@nihongo.org> writes:
> 
> Benjamin> At a guess, your log is getting rotated. Leaving you tailing
> Benjamin> the _old_ (now static) log instead of the new one.
> 
> But File::Tail (at least recent versions) know about that kind of
> stuff, and automatically close and reopen the log.

Good point. 

Anyway I misread his posting - he is tailing another file and feeding the 
results to syslog rather than tailing a syslog output file. His complaint 
appears to be that it never arrives at the syslog server. But what he 
posted doesn't tell whether or not File::Tail is reading or not - it just 
tells us that it isn't being sent to his syslog server. The problem could 
be anywhere in his code given what he has posted so far.

So, my revised answer is "Open a debugging log file locally and write 
each read File::Tail generated line to it". That will at least either 
eliminate or prove that it is File::Tail that is the problem.

-- 
Benjamin Franz



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

Date: Sat, 10 Apr 2004 13:47:10 +0200
From: "PHP2" <gp@nospm.hr>
Subject: freesource server control panel for linux server created with Perl?
Message-Id: <c58mq2$q81$1@ls219.htnet.hr>

do you anyone know about any freesource server control panel for linux
server created with Perl with features similar like Ensim, Plesk etc.?

I wish join inside development team..




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

Date: Sat, 10 Apr 2004 22:40:29 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: freesource server control panel for linux server created with Perl?
Message-Id: <1373177.jfEO0vNMFI@GMT-hosting-and-pickle-farming>

PHP2 wrote:

> do you anyone know about any freesource server control panel for linux
> server created with Perl with features similar like Ensim, Plesk etc.?
> 
> I wish join inside development team..

In general control panels are nor written in Perl, since you must assume a
minimal install.

The best known open source control panel is www.webmin.com & it does not
assume Perl/APACHE. Its written in C with its own web server.

For Perl projects looking for developers search 
http://perl.foundries.sourceforge.net/

gtoomey



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

Date: Sat, 10 Apr 2004 22:57:41 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: freesource server control panel for linux server created with Perl?
Message-Id: <5177504.8EQnfBSt0m@GMT-hosting-and-pickle-farming>

Gregory Toomey wrote:

I just put my foot in it! Webmin is written in Perl 
http://sourceforge.net/projects/webadmin, but does not need Apache.

gtoomey


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

Date: Sat, 10 Apr 2004 09:31:25 -0500
From: Web Surfer <raisin@delete-this-trash.mts.net>
Subject: Re: How can this be done?
Message-Id: <MPG.1ae1c13b95f732ac989805@news.mts.net>

[This followup was posted to comp.lang.perl.misc]

In article <7WJdc.63724$oR5.3009@pd7tw3no>, ducott_99@yahoo.com says...
> I am trying to manipulate the data of my @rray based on the first character
> of each array element. My array contains many names sorted alphabetically.
> EG:
> 
> Adam
> Aron
> Brian
> Bert
> Chris
> Daniel
> Derk
> Ernie
> Frank
> 
> and so on ....
> 
> Now, I want my script to dected the first letter of the name and take action
> based on it like this:
> 
> foreach $name (@names) {
>   if (first letter of $name eq "A" or "a") {
>     $condition = "True";
>     $name = "A:$name\n";
>   } else {
>     $condition = "False";
>   }
> }
> 
> So if the above syntax was valid, the names in the @rray would now print
> like this:
> 
> A:Adam
> A:Aron
> Brian
> Bert
> Chris
> Daniel
> Derk
> Ernie
> Frank
> 
> I realize the script above will only do "A" ... and i'll need to figure out
> how to do the whole alphabet ... but one step at a time, still need some
> help how to detect the first letter and take action if conditions meet. TIA
> 
> Randy

$letter1 = substr $name,0,1;  # get 1st letter of name
if ( "a" eq lc $letter1 ) {
    $condition = "True";
     $name = "A:$name\n";
}


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

Date: Sat, 10 Apr 2004 15:51:32 GMT
From: Ala Qumsieh <xxala_qumsiehxx@xxyahooxx.com>
Subject: Re: How can this be done?
Message-Id: <8KUdc.50185$L52.22888@newssvr25.news.prodigy.com>

Robert TV wrote:

> if (first letter of $mystring eq "G") {
>   do this
> } else {
>   do that
> }

TMTOWTDI, but I'd do it this way:

if ($name =~ /^[A-Z]/) {
   $condition = 'True';
   $name      = "$&: $name";
} else {
   $condition = 'False';
}

--Ala



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

Date: Sat, 10 Apr 2004 16:18:35 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How can this be done?
Message-Id: <x765c7kdr9.fsf@mail.sysarch.com>

>>>>> "AQ" == Ala Qumsieh <xxala_qumsiehxx@xxyahooxx.com> writes:

  AQ> TMTOWTDI, but I'd do it this way:

  AQ> if ($name =~ /^[A-Z]/) {
  AQ>    $condition = 'True';
  AQ>    $name      = "$&: $name";

gack! stay away from $& and friends. its use will slow down all regexes
as it forces an extra copy to be saved. just do anormal grab with ().

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Sat, 10 Apr 2004 15:40:47 +0800
From: sam <samwun@hgcbroadband.com>
Subject: how to extract data from optional patterns?
Message-Id: <c589mo$2dcb$1@news.hgc.com.hk>

Hi,

I need to parse some strings that is seperated by the "=" character 
shown as below:

<message type=’Logon’ session=’SN’ status=’Status’ err_msg=’ErrMsg’/>

<message sn = ’SN’ msg_type = ’Msg’ date = ’Date’ time = ’Time’ host = 
’IP’ app=’App’ severity = 'Severity' msg = 'Msg'/>

<message> <request = 'Logon' username = 'someone' password = 'pass'/>

<message session_number='SessionNumber' request='Logoff'/>



I want to extract the information my_string from
the pattern ='(my_string)'

The following is the perl script with pattern
#!/usr/bin/perl -w
use strict;
while (<DATA>) {
print "$1 $2 $3\n" if /^<message.+= ?'([^=^']+)' *[A-Za-z]+ ?= 
?'([^=^']+)' *(.*)>$/; } __DATA__
<message> <request = 'Logon' username = 'someone' password = 'pass'/>

The result is:
sec@fbsd [3:52pm] [~/unpv12e/s_ipmon]> !p
perl reg_test4.pl
someone pass /

But my expect result is:
Logon someone pass

Any suggestion is very appreciated.
Thanks
Sam


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

Date: Sat, 10 Apr 2004 03:06:55 -0500
From: John Bokma <postmaster@castleamber.com>
Subject: Re: how to extract data from optional patterns?
Message-Id: <4077ab27$0$24349$58c7af7e@news.kabelfoon.nl>

sam wrote:

> Hi,
> 
> I need to parse some strings that is seperated by the "=" character 
> shown as below:
> 
> <message type=’Logon’ session=’SN’ status=’Status’ err_msg=’ErrMsg’/>
> 
> <message sn = ’SN’ msg_type = ’Msg’ date = ’Date’ time = ’Time’ host = 
> ’IP’ app=’App’ severity = 'Severity' msg = 'Msg'/>
> 
> <message> <request = 'Logon' username = 'someone' password = 'pass'/>
> 
> <message session_number='SessionNumber' request='Logoff'/>
> 
> 
> 
> I want to extract the information my_string from
> the pattern ='(my_string)'

XML?

> The following is the perl script with pattern
> #!/usr/bin/perl -w

remove -w and use

use warnings;

> use strict;
> while (<DATA>) {
> print "$1 $2 $3\n" if /^<message.+= ?'([^=^']+)' *[A-Za-z]+ ?= 
> ?'([^=^']+)' *(.*)>$/; } __DATA__
> <message> <request = 'Logon' username = 'someone' password = 'pass'/>

Read about non-greedy matching, but if you really want to do something 
with XML data, use a module that can parse XML.

> The result is:
> sec@fbsd [3:52pm] [~/unpv12e/s_ipmon]> !p
> perl reg_test4.pl
> someone pass /

Note: [^=^'] no need to put in the second ^ (unless you don't want to 
match ^)

-- 
John                            personal page:  http://johnbokma.com/

Experienced Perl / Java developer available - http://castleamber.com/


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

Date: Sat, 10 Apr 2004 09:02:33 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl Timer
Message-Id: <slrnc7fvjp.gjv.tadmc@magna.augustmail.com>

jon <xbg86@webtv.net> wrote:

> is there a way to make a perl timer?


Time for 5 seconds:

   perl -e 'sleep shift; print "Bzzzzz\n"' 5

Time for 10 seconds:

   perl -e 'sleep shift; print "Bzzzzz\n"' 10




If that doesn't meet your requirements, then consider sharing
what those requirements are.


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


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

Date: Sat, 10 Apr 2004 07:12:39 GMT
From: marty@votenader.org
Subject: Statement on Spam and VoteNader.org
Message-Id: <7619a4a8.a6fa6e49@host-69-48-73-244.roc.choiceone.net>

Spam from VoteNader.org?  (Or naderexplore04.org)

You may have received spam email recently that appears to come from our
campaign, or be about our campaign -- perhaps the "From" and or
"Reply-to" addresses look like they are coming from VoteNader.org. Or
perhaps you have received a message that appears to come from an
individual (if the address is real, the real owner probably did not send
this email either) with suppressed recipients. Or maybe you received an
email that appeared to come from yourself promoting our site.

These messages are NOT from Nader for President 2004, and these email
tactics are NOT condoned by our campaign in any way.

UPDATE: Some of the latest forged emails have been made to appear to be
coming from naderexplore04.org. Again, we are not responsible for this
unfortunate abuse of email, and there is little in the technical sense
that we can do to prevent this as it has nothing to do with our actual
infrastructure. We are collecting information. 

NOTE: The emails with malicious code (viruses, worms, etc.) often have
attachments. Our campaign will NEVER send attachments in our
announcement emails to you. Please be sure that you have anti-virus
software and have the latest updates available for your anti-virus
software. 

Our hosting service has alerted us to say that Nader for President 2004
appears to be the target of what is called a "Joe Job." Such an event is
where a spammer forges email to make it appear to have come from some
other domain (such as ours -- or yourself). This is hard to prevent on
our end and part of the insecure nature of the email protocol in
general. 

Members of our actual email list must request to receive email from us
(either through Ralph's signup sheets or subscribing during our
exploratory phase, or now on our campaign site). When one signs up for
email they must reply to a confirmation message before they receive our
list announcements. 

Our public announcement emails come from "campaign@votenader.org,"
contain a "Paid for by Nader for President 2004" statement at the
bottom, and have "updates@lists.votenader.org" in the "To:" header.
Unfortunately, some of these indicators can be forged as well. 

Most of the Spam that we have received complaints about appear to be
forged from email addresses not associated with votenader.org (often
forged to appear to be coming from government email addresses), and have
our website code embedded in the body of the email with hidden tags that
contain random words that work to subvert anti-spam software.

If you are on our lists, you can ALWAYS unsubscribe at ANY time by
following the instructions included at the end of our announcements. You
can also use our unsubscribe page using the email address you signed up
with.

If you are receiving this SPAM, we extend our apologies.

We will pursue the spammers to the full extent of the law.

For more information, please review these resources:

How Do I Determine the Source of an Email?
http://www.aota.net/Email_Spam_Prevention_and_Mgmt/emailsource.php4

Why Does This Spam Look Like I Sent It?
http://www.aota.net/Email_Spam_Prevention_and_Mgmt/spamfrom.php4

Coping with a Joe Job
http://www.sitepoint.com/article/sabotage-coping-joe-job/2

Please contact abuse@votenader.org with any questions. We have received
many samples of the spam and are working to identify the source, if
possible. 

Volunteer -------------- http://www.votenader.org/get_involved/index.php
Ballot Access ---------- http://www.votenader.org/ballot_access/index.php
Register to Vote ------- http://www.rockthevote.com/rtv_register.php
Contribute ------------- http://www.votenader.org/contribute/index.php
Contact Us ------------- http://www.votenader.org/contact/index.php

--
spared
no cost purchasing ads in newspapers around the world to publish its
anti-American Statement of Conscience.  Its signatories include scores of
Hate America bigwigs, like Noam Chomsky, Howard Zinn, Michael Parenti,
Gloria Steinem and Barbara Kingsolver.  Hollywood icons (and many more
has-beens) like Danny Glover, Jessica Lange, Tyne Daly, Martin Sheen and Ed
Harris have also signed or endorsed the statement. NION organizes marches
and other protest activities in its support.

However, Not In Our Name is deeper than the latest academic babblers and
limosuine liberals. NION professes peace, yet it is involved - directly as
well as indirectly - with terrorist organizations and anti-American
propaganda campaigns headed by fanatical Communist and Muslim groups. NION
has cemented alliances with bona fide radical organizations like the
Interreligious Foundation for Community Organization, Women's International
League for Peace and Freedom and the Revolutionary Communist Party.

Not In Our Name:  What is IFCO?

Not In Our Name (NION) r




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

Date: Sat, 10 Apr 2004 15:42:05 +0000 (UTC)
From: J Krugman <jkrugman@yahbitoo.com>
Subject: Tests fail in cpan, succeed manually
Message-Id: <c594kd$91k$1@reader1.panix.com>




I'm trying to understand what's going on, and decide what to do.
When I attemptto install the module XML::Validator::Schema via
CPAN.pm, all attempted tests fail:

Failed Test Status Wstat Total Fail  Failed  List of Failed
--------------------------------------------------------------------------------t/01basic.t                    2    2 100.00%  1-2
t/02yaml.t                   152  152 100.00%  1-152
t/03types.t                  163  163 100.00%  1-163
t/04model.t                   38   38 100.00%  1-38
2 tests skipped.
Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 29
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

But when I run these tests "by hand" (e.g. in the build directory,
perl -Mlib='./blib/lib' t/01basic.t), they *all* succeed.

This is a very unusual situation.  My installations via CPAN.pm
typically succeed, and if they fail because of some failed test,
this test fails also when invoked manually.

Can someone tell me why these tests would fail when invoked through
CPAN.pm, but not when they are invoked manually?  And should I
disregard CPAN.pm's warnings in this case and force the installation?

Thanks!

jill

-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.



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

Date: Sat, 10 Apr 2004 12:24:35 -0400
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Tests fail in cpan, succeed manually
Message-Id: <pan.2004.04.10.16.24.30.113130@remove.adelphia.net>

On Sat, 10 Apr 2004 15:42:05 +0000, J Krugman wrote:



> 
> I'm trying to understand what's going on, and decide what to do. When I
> attemptto install the module XML::Validator::Schema via CPAN.pm, all
> attempted tests fail:
> 
> Failed Test Status Wstat Total Fail  Failed  List of Failed
>
> --------------------------------------------------------------------------------
> t/01basic.t>                    2    2 100.00%  1-2 
> t/02yaml.t                     152 152 100.00%  1-152 
> t/03types.t                   163  163 100.00%  1-163
> t/04model.t                   38   38 100.00%  1-38 2 tests skipped.
> Failed 4/6 test scripts, 33.33% okay. 355/355 subtests failed, 0.00%
> okay. make: *** [test_dynamic] Error 29
>   /usr/bin/make test -- NOT OK
> Running make install
>   make test had returned bad status, won't install without force
> 
> But when I run these tests "by hand" (e.g. in the build directory, perl
> -Mlib='./blib/lib' t/01basic.t), they *all* succeed.
> 
> This is a very unusual situation.  My installations via CPAN.pm
> typically succeed, and if they fail because of some failed test, this
> test fails also when invoked manually.
> 
> Can someone tell me why these tests would fail when invoked through
> CPAN.pm, but not when they are invoked manually?  And should I disregard
> CPAN.pm's warnings in this case and force the installation?

Some modules respond well to (when making by hand):
 make test TEST_VERBOSE=1

This, if the module is willing, will produce verbose output that *may*
help you make this decision.

You could look at the test(s) being performed.  In this case, you can type
(in the CPAN shell) "look XML::Validator::Schema", then examine the files
in the 't' directory.

You could also look over the README and INSTALL files for the module. I've
found that (for example, the various DBD modules) there need to be some
environment settings that need to be set *before* the install is done.

Just FYI - there *should* be no difference doing an install by hand or
using CPAN.  CPAN just "automates" the exercise of installing a module.

Just my $0.02 :-)

HTH

Jim



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

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


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