Thanks very much for that. Alas, when I run it on my machine I get the same problem. My output is:
ok 1 - user 1 added
ok 2 - user 2 added
ok 3 - user 3 added
ok 4 - user 4 added
ok 5 - user 5 added
ok 6 - user 6 added
ok 7 - password for user3 changed
ok 8 - user 1 still valid
ok 9 - user 2 still valid
ok 10 - user 3 still valid
not ok 11 - user 4 still valid
# Failed test (ht.pl at line 33)
ok 12 - user 5 still valid
ok 13 - user 6 still valid
# Looks like you failed 1 tests of 13.
Also, when I comment out your last line and then examine the password file itself I find
... which is the same prob I got before.
Perhaps it's a version problem. I have Apache::Htpasswd v 1.5 and Test::More v 0.33. Also, I don't have method diag
, which I'm substituting with die
- this in itself wouldn't account for why it's not working for me, but might point to the difficulty. Except, I am guessing diag
is a Test::More method?insta-update..
Aha! It *was* a version problem. I installed v 1.5.5 and now get the right result from your script... and I doubt not, also from the script that was giving me trouble...insta-update 2
Yes! It works now. Thanks very much - I'm most grateful.
§ George Sherston
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.