[29255] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 499 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 9 14:10:07 2007

Date: Sat, 9 Jun 2007 11:09:06 -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, 9 Jun 2007     Volume: 11 Number: 499

Today's topics:
    Re: a password encryption question.  nightcats@gmail.com
    Re: a password encryption question. <sbryce@scottbryce.com>
        How can I use the string variable expansion for OO "$se <ilias@lazaridis.com>
    Re: How can I use the string variable expansion for OO  <nobull67@gmail.com>
    Re: How can I use the string variable expansion for OO  <ilias@lazaridis.com>
    Re: How can I use the string variable expansion for OO  <rvtol+news@isolution.nl>
    Re: How to keep Documentation close to the Method using <ilias@lazaridis.com>
    Re: How to keep Documentation close to the Method using <spamtrap@dot-app.org>
        Not an ARRAY reference at ...Heap/Elem.pm line 31  donuvitanoga@gmail.com
    Re: Not an ARRAY reference at ...Heap/Elem.pm line 31 <sisyphus1@nomail.afraid.org>
    Re: Not an ARRAY reference at ...Heap/Elem.pm line 31  donuvitanoga@gmail.com
    Re: Opening a file twice and having an if loop <wahab-mail@gmx.de>
    Re: Opening a file twice and having an if loop <Slain.k@gmail.com>
    Re: Opening a file twice and having an if loop <wahab-mail@gmx.de>
    Re: Opening a file twice and having an if loop <Slain.k@gmail.com>
    Re: The Concepts and Confusions of Prefix, Infix, Postf <lew@noemail.lewscanon.com>
    Re: Yet Another Software Challenge <bc@freeuk.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 09 Jun 2007 00:43:58 -0700
From:  nightcats@gmail.com
Subject: Re: a password encryption question.
Message-Id: <1181375038.642765.243290@x35g2000prf.googlegroups.com>

On 6 9 ,   1 13 , nightc...@gmail.com wrote:
> On 6 9 ,   8 13 , "Peter Wyzl" <wyze...@yahoo.com> wrote:
>
>
>
>
>
> > <nightc...@gmail.com> wrote in message
>
> >news:1181320453.612263.162410@i38g2000prf.googlegroups.com...
>
> > > Hi,
>
> > > I have a password encryption question that really needs help.  I have
> > > two password-related PL files.
>
> > > Take an example of "test2",
> > > One would creat an encryption  that looking like this, "MMehO15WVVavQ"
> > > (Or every password with a MMxxxxxxxx pattern
>
> > > The other would be looking like this, "ae8FEYefjhNw2"
> > > Or every password with an "aexxxxx" pattern.
>
> > > The encryption script in the "MM" perl file is this:
>
> > >     $pass = crypt($password, "MM");
>
> > This is using MM as the salt to crypt.
>
> > > The encryption in the second perl (the 'ae' thing) is this:
>
> > >       $test_passwd = crypt($FORM{'password'}, substr($passwd, 0, 2));
>
> > This is using the first two characters of $passwd as the salt to crypt.
>
> > > ------------
>
> > > My question is,  how could I make them created the same version of
> > > encryption, so that the two files can share one set of password?
>
> > Make them both do the same thing...
>
> > $pass = crypt($password,  substr($passwd, 0, 2));
>
> > $test_passwd = crypt($FORM{'password'}, substr($passwd, 0, 2));
>
> > Read up on the crypt function, perldoc -f crypt
>
> > The substr($passwd, 0, 2) portion is taking the first 2 character of the
> > variable $passwd and using that as the 'salt' to the crypt function.
>
> > So for the above to work you need to know what is in the $passwd variable in
> > the second script, and make sure that is available the same in the first
> > program.
>
> > Another way would be
>
> > $pass = crypt($password, "MM");
>
> > $test_passwd = crypt($FORM{'password'}, 'MM');
>
> > Though using the same salt for all passwords is a huge security hole.
>
> > The docs for the crypt function give some advise about selecting a good
> > salt.
>
> > P
>
> Thank you guys for advising.
>
> I decide to change the Salt into random form for security sake.
>
> I made the first script:
>
>        $pass = crypt($password, "MM");
>
> change to this:
>
>        $pass = crypt($password, substr($password, 0, 2));
>
> However, the first two letters of the encrypted password stays the way
> they are.
>
> like, "test1" becomes "teXXXXX", and "wxyz" becomes "wxXXXXX".  Only
> the letters behind the first two are crypted.  Did I do anything
> wrong?
>
> Thanks.-         -
>
> -         -

Hi, once again, I found answers for my previos question

I chang my script to:

   @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/');
   $salt = join ('', @alphabet[rand (64), rand (64)]);

   $password = "$FORM{'password'}";
   $pass = crypt($password, $salt);

The ouput was a perfect result of random-crypted password.  However, a
new problem was created.

My Login.cgi could not read the ramdom-cryped password.
The related script was,

   @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/');
   $salt = join ('', @alphabet[rand (64), rand (64)]);

   if (crypt($password, $salt) ne $pwordlist{$FORM{'username'}})
      {
         &error(not_match);
          }

How could I make it successfully veryify with the crypted-password?
thanks.





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

Date: Sat, 09 Jun 2007 09:44:25 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: a password encryption question.
Message-Id: <Z_WdnRMJ6OlFV_fbnZ2dnUVZ_viunZ2d@comcast.com>

nightcats@gmail.com wrote:

> How could I make it successfully veryify with the crypted-password?
> thanks.

I think the best answer to your question is not to use crypt, but to use 
an MD5 hash, or SHA1 hash.

Digest::MD5 is part of the standard distribution. I don't know if 
Digest::SHA1 is.



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

Date: Sat, 09 Jun 2007 09:58:29 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <1181383109.741867.62780@n4g2000hsb.googlegroups.com>

I have working code like this:

{{{
#!perl
    my $value = $self->val($attrib);
    return "$label: $value";
}}}

I would like to write something like

{{{
#!perl
    return "$self->label: $self->val($attrib)";
}}}

is ther ANY way of achieving this, whilst using ONLY the string?

 .

--
http://dev.lazaridis.com/lang/ticket/13



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

Date: Sat, 09 Jun 2007 11:08:07 -0000
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <1181387287.394157.236970@p47g2000hsd.googlegroups.com>

On Jun 9, 10:58 am, Ilias Lazaridis <i...@lazaridis.com> wrote:
> I have working code like this:
>
> {{{
> #!perl
>     my $value = $self->val($attrib);
>     return "$label: $value";
>
> }}}
>
> I would like to write something like
>
> {{{
> #!perl
>     return "$self->label: $self->val($attrib)";
>
> }}}
>
> is ther ANY way of achieving this, whilst using ONLY the string?

Define ONLY.

Even "xxx $foo xxx" is just syntactic sugar for "xxx" . $foo . "xxx".

BTW this is FAQ: "How do I expand function calls in a string?"

See also the Interpolate module and Tie::OneOff. (Tie::OneOff was
originally Tie::Simple but was never realeased under that name. Then
someone else released a substancially identical module under the
originl name!).



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

Date: Sat, 09 Jun 2007 11:57:25 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <1181390245.589894.251960@q75g2000hsh.googlegroups.com>

On Jun 9, 2:08 pm, Brian McCauley <nobul...@gmail.com> wrote:
> On Jun 9, 10:58 am, Ilias Lazaridis <i...@lazaridis.com> wrote:
>
> > I have working code like this:
>
> > {{{
> > #!perl
> >     my $value = $self->val($attrib);
> >     return "$label: $value";
>
> > }}}
>
> > I would like to write something like
>
> > {{{
> > #!perl
> >     return "$self->label: $self->val($attrib)";
>
> > }}}
>
> > is ther ANY way of achieving this, whilst using ONLY the string?
>
> Define ONLY.
>
> Even "xxx $foo xxx" is just syntactic sugar for "xxx" . $foo . "xxx".

I like to use this 'syntactic sugar' (and some more, that's the reason
for this thread).

> BTW this is FAQ: "How do I expand function calls in a string?"

I've searched for "method" and "attributes", as my main interest is OO
Perl.

I'll search in future for "function", too.

"
In general, this is fraught with quoting and readability problems, but
it is possible. To interpolate a subroutine call (in a list context)
into a string:

    print "My sub returned @{[mysub(1,2,3)]} that time.\n"
"
http://www.perlmonks.org/?node=How%20do%20I%20expand%20function%20calls%20in%20a%20string%3F

this solution has problems with readability (as already noted by the
author).

> See also the Interpolate module and Tie::OneOff. (Tie::OneOff was
> originally Tie::Simple but was never realeased under that name. Then
> someone else released a substancially identical module under the
> originl name!).

http://search.cpan.org/~nobull/Tie-OneOff/lib/Tie/OneOff.pm
http://perl.plover.com/Interpolation/manual.html

Thanks for the info, but I'm unable to see how I could process this
string:

return "$self->label: $self->val($attrib)"

is there any stand-alone function available (something like
"stringeval"), which would process the string correctly?

If yes (or if I write my own), is there a way to override the default
string-processing behaviour of perl on a per-package basis?

 .

--
http://dev.lazaridis.com/lang/ticket/13




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

Date: Sat, 9 Jun 2007 14:52:02 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <f4eets.1ik.1@news.isolution.nl>

Ilias Lazaridis schreef:

>     return "$self->label: $self->val($attrib)";
> is ther ANY way of achieving this, whilst using ONLY the string?

Just play with it:

perl -e'
  my ($self, $attrib) = qw(main 42);
  sub val{ "<pkg: $_[0], val:$_[1]>" };
  sub label{ "my-label" };

  print "$_\n" for
      $self->label .": ". $self->val($attrib),
      qq(@{[ $self->label ]}: @{[ $self->val($attrib) ]}),
      sprintf "%s: %s", $self->label, $self->val($attrib),
  ;
'
my-label: <pkg: main, val:42>
my-label: <pkg: main, val:42>
my-label: <pkg: main, val:42>

-- 
Affijn, Ruud

"Gewoon is een tijger."


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

Date: Sat, 09 Jun 2007 12:03:10 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: How to keep Documentation close to the Method using POD?
Message-Id: <1181390590.066372.321670@p47g2000hsd.googlegroups.com>

On Jun 8, 1:45 pm, Ilias Lazaridis <i...@lazaridis.com> wrote:

> #!perl
> sub methodName { my ($parm1, $param2) = @_;
>    =func Short one line description of what this method does
>
> }}}

I've found this perl module, which seems to have the flexibility to
handle cases like the above:

http://perl.overmeer.net/oodoc/

has anyone experiences with OODoc?

 .

--
http://dev.lazaridis.com/lang/ticket/12



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

Date: Sat, 09 Jun 2007 08:58:53 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: How to keep Documentation close to the Method using POD?
Message-Id: <m21wglp9ma.fsf@local.wv-www.com>

Ilias Lazaridis <ilias@lazaridis.com> writes:

> On Jun 8, 1:45 pm, Ilias Lazaridis <i...@lazaridis.com> wrote:
>
>> #!perl
>> sub methodName { my ($parm1, $param2) = @_;
>>    =func Short one line description of what this method does
>>
>> }}}
>
> I've found this perl module, which seems to have the flexibility to
> handle cases like the above:
>
> http://perl.overmeer.net/oodoc/
>
> has anyone experiences with OODoc?

No experience with it, but it looks handy - I may start using it. :-)

I would put in a make file build step, to generate a .pod file from a .pm
file. The generator would take your one-line macro above, and expand it to
the standard three- or four-line POD format that everyone's perldoc tool
can read.

Informal testing shows that "perldoc Hello" will show Hello.pod if it's
available in addition to Hello.pm, but I don't know where that's documented;
"perldoc perldoc" doesn't mention it.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 09 Jun 2007 15:07:03 -0000
From:  donuvitanoga@gmail.com
Subject: Not an ARRAY reference at ...Heap/Elem.pm line 31
Message-Id: <1181401623.497372.295740@q69g2000hsb.googlegroups.com>

Hi,

when i try to install the Graph CPAN module, I get failures in a lot
of its tests.
All failure are in the Heap module, file elem.pm line 31..

any ideas ?

thanks...

Here is the install log:
CPAN.pm: Going to build J/JH/JHI/Graph-0.81.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Graph
cp lib/Graph/Directed.pm blib/lib/Graph/Directed.pm
cp lib/Graph/UnionFind.pm blib/lib/Graph/UnionFind.pm
cp lib/Graph/Undirected.pm blib/lib/Graph/Undirected.pm
cp lib/Graph/AdjacencyMap/Vertex.pm blib/lib/Graph/AdjacencyMap/
Vertex.pm
cp lib/Graph/AdjacencyMap/Light.pm blib/lib/Graph/AdjacencyMap/
Light.pm
cp lib/Graph/Matrix.pm blib/lib/Graph/Matrix.pm
cp lib/Graph/Attribute.pm blib/lib/Graph/Attribute.pm
cp lib/Graph/AdjacencyMatrix.pm blib/lib/Graph/AdjacencyMatrix.pm
cp lib/Graph/SPTHeapElem.pm blib/lib/Graph/SPTHeapElem.pm
cp lib/Graph/AdjacencyMap.pm blib/lib/Graph/AdjacencyMap.pm
cp lib/Graph.pm blib/lib/Graph.pm
cp lib/Graph/MSTHeapElem.pm blib/lib/Graph/MSTHeapElem.pm
cp lib/Graph/AdjacencyMap/Heavy.pm blib/lib/Graph/AdjacencyMap/
Heavy.pm
cp lib/Graph/TransitiveClosure/Matrix.pm blib/lib/Graph/
TransitiveClosure/Matrix
 .pm
cp lib/Graph/TransitiveClosure.pm blib/lib/Graph/TransitiveClosure.pm
cp lib/Graph/Traversal/BFS.pm blib/lib/Graph/Traversal/BFS.pm
cp lib/Graph/Traversal/DFS.pm blib/lib/Graph/Traversal/DFS.pm
cp lib/Graph/Traversal.pm blib/lib/Graph/Traversal.pm
cp lib/Graph/BitMatrix.pm blib/lib/Graph/BitMatrix.pm
cp lib/Graph.pod blib/lib/Graph.pod
Manifying blib/man3/Graph::UnionFind.3pm
Manifying blib/man3/Graph::Directed.3pm
Manifying blib/man3/Graph::AdjacencyMap::Vertex.3pm
Manifying blib/man3/Graph::Undirected.3pm
Manifying blib/man3/Graph::TransitiveClosure::Matrix.3pm
Manifying blib/man3/Graph::TransitiveClosure.3pm
Manifying blib/man3/Graph::Traversal::BFS.3pm
Manifying blib/man3/Graph::Matrix.3pm
Manifying blib/man3/Graph::Traversal::DFS.3pm
Manifying blib/man3/Graph::Traversal.3pm
Manifying blib/man3/Graph::AdjacencyMatrix.3pm
Manifying blib/man3/Graph::BitMatrix.3pm
Manifying blib/man3/Graph::AdjacencyMap.3pm
Manifying blib/man3/Graph.3pm
 /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/00_use.......................ok
t/01_isa.......................ok
t/02_trap......................ok
t/03_derived...................ok
t/04_dgraph....................ok
t/05_ugraph....................ok
t/06_new.......................ok
t/07_gen.......................ok
t/08_stringify.................ok
t/09_eq........................ok
t/10_has_vertices..............ok
t/11_vertices..................ok
t/12_has_vertex................ok
t/13_add_vertex................ok
t/14_delete_vertex.............ok
t/15_has_edges.................ok
t/16_edges.....................ok
t/17_has_edge..................ok
t/18_add_edge..................ok
t/19_delete_edge...............ok
t/20_countvertexed.............ok
t/21_multivertexed.............ok
t/22_refvertexed...............ok
t/23_hypervertexed.............ok
t/24_mixvertexed...............ok
t/25_countedged................ok
t/26_multiedged................ok
t/27_omnidirected..............ok
t/28_hyperedged................ok
t/29_uniqedged.................ok
t/30_mixedged..................ok
t/31_hypervertex...............ok
t/32_hypervertex_edges.........ok
t/33_hyperedge.................ok
t/34_omnivertexed..............ok
t/35_uniqvertexed..............ok
t/36_omniuniqvertexed..........ok
t/37_hypervertex_implicit......ok
t/38_vertices_at...............ok
t/39_edges_at..................ok
t/40_edges_from................ok
t/41_edges_to..................ok
t/42_add_path..................ok
t/43_has_path..................ok
t/44_delete_path...............ok
t/45_add_cycle.................ok
t/46_has_cycle.................ok
t/47_delete_cycle..............ok
t/48_get_vertex_count..........ok
t/49_get_edge_count............ok
t/50_vertex_attributes.........ok
t/51_multivertex_attributes....ok
t/52_edge_attributes...........ok
t/53_multiedge_attributes......ok
t/54_graph_attributes..........ok
t/55_attributes................ok
t/56_neighbourhood.............ok
t/57_degree....................ok
t/58_connections...............ok
t/59_dfs.......................ok
t/60_bfs.......................ok
t/61_connected.................ok
t/62_bcc.......................ok
t/63_scc.......................ok
t/64_mst.......................ok 1/22Not an ARRAY reference at /usr/
local/share
/perl/5.8.8/Heap/Elem.pm line 31.
# Looks like you planned 22 tests but only ran 8.
# Looks like your test died just after 8.
t/64_mst.......................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 9-22
      Failed 14/22 tests, 36.36% okay
t/65_ref.......................ok
t/66_simple....................ok
t/67_copy......................ok
t/68_transpose.................ok
t/69_complete..................ok
t/70_complement................ok
t/71_spt.......................Not an ARRAY reference at /usr/local/
share/perl/5
 .8.8/Heap/Elem.pm line 31.
# Looks like your test died before it could output anything.
t/71_spt.......................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-124
      Failed 124/124 tests, 0.00% okay
t/72_transitive................ok
t/73_diameter..................ok
t/74_random....................ok
t/75_attribute_array...........ok
t/76_attribute_hash............ok
t/77_adjacency.................ok
t/78_expect....................ok
t/79_unionfind.................ok
t/80_isomorphic................ok
t/81_dump......................ok
t/82_cycle.....................ok
      1/1 skipped: no Devel::Cycle
t/83_bitmatrix.................ok
t/g02_00directed...............ok
t/g02_01undirected.............ok
t/g02_02multiple...............ok
t/g02_03degree.................ok
t/g02_04attribute..............ok
t/g02_05copy...................ok
t/g02_06transpose..............ok
t/g02_07complete...............ok
t/g02_08complement.............ok
t/g02_09scc....................ok
t/pod-coverage.................skipped
      all skipped: Test::Pod::Coverage 1.00 required for testing POD
coverage
t/pod..........................skipped
      all skipped: Test::Pod 1.00 required for testing POD
t/u_at1........................Not an ARRAY reference at /usr/local/
share/perl/5
 .8.8/Heap/Elem.pm line 31, <DATA> line 5078.
# Looks like your test died before it could output anything.
t/u_at1........................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
      Failed 2/2 tests, 0.00% okay
t/u_at2........................Not an ARRAY reference at /usr/local/
share/perl/5
 .8.8/Heap/Elem.pm line 31, <DATA> line 24.
# Looks like your test died before it could output anything.
t/u_at2........................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-4
      Failed 4/4 tests, 0.00% okay
t/u_at3........................Not an ARRAY reference at /usr/local/
share/perl/5
 .8.8/Heap/Elem.pm line 31.
# Looks like your test died before it could output anything.
t/u_at3........................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-44
      Failed 44/44 tests, 0.00% okay
t/u_bb_rv......................ok
t/u_bf.........................ok
t/u_bill.......................ok
t/u_bo.........................ok 1/95Not an ARRAY reference at /usr/
local/share
/perl/5.8.8/Heap/Elem.pm line 31.
# Looks like you planned 95 tests but only ran 79.
# Looks like your test died just after 79.
t/u_bo.........................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 80-95
      Failed 16/95 tests, 83.16% okay
t/u_bo1........................ok 1/20Not an ARRAY reference at /usr/
local/share
/perl/5.8.8/Heap/Elem.pm line 31.
# Looks like your test died just after 20.
t/u_bo1........................dubious
      Test returned status 255 (wstat 65280, 0xff00)
      after all the subtests completed successfully
t/u_bo_ap1.....................ok
t/u_bo_ap2.....................ok
t/u_bo_apx.....................ok
t/u_jh_va......................ok
t/u_mn_va......................ok
t/u_ng_mst.....................ok 1/0Not an ARRAY reference at /usr/
local/share/
perl/5.8.8/Heap/Elem.pm line 31.
# Looks like your test died just after 1.
t/u_ng_mst.....................dubious
      Test returned status 255 (wstat 65280, 0xff00)
      after all the subtests completed successfully
t/u_ng_path....................ok
t/u_ng_scc.....................ok
t/u_rb_cc......................ok
t/u_re_sd......................Not an ARRAY reference at /usr/local/
share/perl/5
 .8.8/Heap/Elem.pm line 31.
# Looks like your test died before it could output anything.
t/u_re_sd......................dubious
      Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
      Failed 2/2 tests, 0.00% okay
t/u_sn_sva.....................ok
t/u_te_ae......................ok
t/u_te_me......................ok
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/64_mst.t    255 65280    22   28 127.27%  9-22
t/71_spt.t    255 65280   124  248 200.00%  1-124
t/u_at1.t     255 65280     2    4 200.00%  1-2
t/u_at2.t     255 65280     4    8 200.00%  1-4
t/u_at3.t     255 65280    44   88 200.00%  1-44
t/u_bo.t      255 65280    95   32  33.68%  80-95
t/u_bo1.t     255 65280    20    0   0.00%  ??
t/u_ng_mst.t  255 65280     1    0   0.00%  ??
t/u_re_sd.t   255 65280     2    4 200.00%  1-2
2 tests and 1 subtest skipped.
Failed 9/117 test scripts, 92.31% okay. 206/8345 subtests failed,
97.53% okay.
make: *** [test_dynamic] Error 255
 /usr/bin/make test -- NOT OK
Running make install
 make test had returned bad status, won't install without force



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

Date: Sun, 10 Jun 2007 02:09:05 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Not an ARRAY reference at ...Heap/Elem.pm line 31
Message-Id: <466ad0a0$0$993$afc38c87@news.optusnet.com.au>


<donuvitanoga@gmail.com> wrote in message 
news:1181401623.497372.295740@q69g2000hsb.googlegroups.com...
> Hi,
>
> when i try to install the Graph CPAN module, I get failures in a lot
> of its tests.
> All failure are in the Heap module, file elem.pm line 31..
>
> any ideas ?

I noticed at http://search.cpan.org/~jhi/Graph-0.81/ that 6 cpan testers 
report failures. I tried to get to 
http://cpantesters.perl.org/show/Graph.html#Graph-0.81 to see if any of them 
had experienced the same problem as you - but cpantesters.perl.org seems to 
be down.

Which version of Heap are you running (and what does line 31 contain) ? If 
it's not the latest (version 0.80), maybe you should update Heap and see if 
that fixes the problem.

If that does fix the problem, then you should file a bug report (at 
http://rt.cpan.org/Public/Dist/Display.html?Name=Graph ) for the Graph 
module, as the Graph module's Makefile.PL specifies that *any* version of 
Heap will suffice.

Hmmm ... on second thoughts (since Heap-0.80 is more recent than Graph-0.81) 
it may be that you need to *downgrade* Heap to an earlier version (if you're 
already running Heap-0.80).

Cheers,
Rob 



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

Date: Sat, 09 Jun 2007 18:04:07 -0000
From:  donuvitanoga@gmail.com
Subject: Re: Not an ARRAY reference at ...Heap/Elem.pm line 31
Message-Id: <1181412247.101234.37220@q66g2000hsg.googlegroups.com>

On Jun 9, 7:09 pm, "Sisyphus" <sisyph...@nomail.afraid.org> wrote:
> <donuvitan...@gmail.com> wrote in message
> > when i try to install the Graph CPAN module, I get failures in a lot
> > of its tests.
> > All failure are in the Heap module, file elem.pm line 31..

> Which version of Heap are you running
I am running the latest, version 0.80

this is line 31 of Elem.pm:

L30:  sub heap {
L31:      @_ > 1 ? ($_[0][1] = $_[1]) : $_[0][1];
L32:  }

> Hmmm ... on second thoughts (since Heap-0.80 is more recent than Graph-0.81)
> it may be that you need to *downgrade* Heap to an earlier version (if you're
> already running Heap-0.80).

Is there a way to do it from the "perl -MCPAN -e shell" command line ?

(I am using cpan shell v1.9102)

Thanks,
donuvi




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

Date: Sat, 09 Jun 2007 09:57:35 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Opening a file twice and having an if loop
Message-Id: <f4dmsi$h7l$1@mlucom4.urz.uni-halle.de>

Slain wrote:
> I am looking for in which case I do not want it to do anything. Can
> some one tell me what mistake I am making in the script below?

This is nearly impossible, because the script
contains too much problems and non-working
approaches.

As far as I can see, you want to replace
the string 'Generic_Text' in your files
by the actual <title>.  If so, (under
unixish OS), the line:

  perl -i.old -0777 -pe '($t)=/<title>(.+?)<\/title>/ and s/Generic_Text/$t/' index.html

would suffice.

But you probably want to say something
first what's your real intention.

Regards

M.


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

Date: Sat, 09 Jun 2007 12:25:48 -0000
From:  Slain <Slain.k@gmail.com>
Subject: Re: Opening a file twice and having an if loop
Message-Id: <1181391948.627683.251350@w5g2000hsg.googlegroups.com>

On Jun 9, 3:57 am, Mirco Wahab <wahab-m...@gmx.de> wrote:
> Slain wrote:
> > I am looking for in which case I do not want it to do anything. Can
> > some one tell me what mistake I am making in the script below?
>
> This is nearly impossible, because the script
> contains too much problems and non-working
> approaches.
>
> As far as I can see, you want to replace
> the string 'Generic_Text' in your files
> by the actual <title>.  If so, (under
> unixish OS), the line:
>
>   perl -i.old -0777 -pe '($t)=/<title>(.+?)<\/title>/ and s/Generic_Text/$t/' index.html
>
> would suffice.
>
> But you probably want to say something
> first what's your real intention.
>
> Regards
>
> M.

Thanks!!!! You are correct, I am trying to replace 'Generic_Text' with
the text which is between <title>String2<title>

Since this String2 is different in different files, my aim is to read
that String 2 and replace Generic_Text with it. I need to run this on
windows. So is there a better way to just read that particular line?




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

Date: Sat, 09 Jun 2007 15:47:00 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Opening a file twice and having an if loop
Message-Id: <f4ebbo$mru$1@mlucom4.urz.uni-halle.de>

Slain wrote:
> Since this String2 is different in different files, my aim is to read
> that String 2 and replace Generic_Text with it. I need to run this on
> windows. So is there a better way to just read that particular line?

On Windows, you have to take into account:
- different command string delimiter
- no wildcard shell expansion

Therefore, the construct to change your text under windows,
for all .html per directory, would read sth. like ...

  FOR %i in (*.html) DO perl -i.old -0777 -pe "($t)=/<title>(.+?)<\/title>/s and s/Generic_Text/$t/" %i

if I'm not totally wrong here.

Regards

M.


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

Date: Sat, 09 Jun 2007 17:10:20 -0000
From:  Slain <Slain.k@gmail.com>
Subject: Re: Opening a file twice and having an if loop
Message-Id: <1181409020.051975.263270@n4g2000hsb.googlegroups.com>

On Jun 9, 9:47 am, Mirco Wahab <wahab-m...@gmx.de> wrote:
> Slain wrote:
> > Since this String2 is different in different files, my aim is to read
> > that String 2 and replace Generic_Text with it. I need to run this on
> > windows. So is there a better way to just read that particular line?
>
> On Windows, you have to take into account:
> - different command string delimiter
> - no wildcard shell expansion
>
> Therefore, the construct to change your text under windows,
> for all .html per directory, would read sth. like ...
>
>   FOR %i in (*.html) DO perl -i.old -0777 -pe "($t)=/<title>(.+?)<\/title>/s and s/Generic_Text/$t/" %i
>
> if I'm not totally wrong here.
>
> Regards
>
> M.

That did it, Thanks a lot!!!



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

Date: Sat, 09 Jun 2007 07:49:32 -0400
From: Lew <lew@noemail.lewscanon.com>
Subject: Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations
Message-Id: <t7idnZqXlsdQDvfbnZ2dnUVZ_orinZ2d@comcast.com>

Twisted wrote:
> On Jun 8, 7:30 pm, "Jürgen Exner" <jurge...@hotmail.com> wrote:
>> xah...@gmail.com wrote:
>>
>> [nothing relevant to Perl]
> 
> Perl?? Perl is even less relevant to Java than the original post,
> which admittedly has some connection to pretty much all programming
> languages. (Perl, on the other hand, has no connection to any known
> programming language. ;) In particular, Perl code looks more like line
> noise than like code from any known programming language. ;))

Hmm - I know of APL and SNOBOL.

-- 
Lew


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

Date: Sat, 09 Jun 2007 08:56:01 -0700
From:  Bart <bc@freeuk.com>
Subject: Re: Yet Another Software Challenge
Message-Id: <1181404561.814635.71370@p47g2000hsd.googlegroups.com>

On Jun 7, 5:23 pm, yan...@gmail.com wrote:

> You're absolutely wrong! Where to start is clearly shown. Thousands of
> people have succeed so far..

I give up. What do you have to do to get started? Solve the riddle of
the salmon then stick that on the end of the url?

By 'clearly shown' I would expect a big button saying 'Start Here'.

bart



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

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


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