I just inherited some code that uses Test::Harness::Straps across a variety of platforms. I discovered that I have two different versions of Straps.pm (on two different platforms), but both of them are labeled 0.26.
The biggest difference that I noticed is that the analyze function returns a hash in one version, and returns a reference in the other version.
I was unable to find the change history online for specifically Test::Harness::Straps (I looked in the Test::Harness package change history, but it did not help). Below I have attached the top 20 or so lines from each file, down to the point where you can see that analyze returns a hash for one, and a reference for the other. It appears that the latter is the newer form, as that is what I see on CPAN.
Can anyone enlighten me on this? Rather than upgrading some of the older systems, I am about to put in code that treats the return value differently depending on if it is a reference. But before doing so, I would like to understand why I have different versions on two different systems (with the same version of perl), and why they have the same version number.
Thanks!
RHEL 3 - x86
[root@vdt-fc3-ia32 tests]# perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi
Straps.pm:
# -*- Mode: cperl; cperl-indent-level: 4 -*-
package Test::Harness::Straps;
use strict;
use vars qw($VERSION);
$VERSION = '0.26';
use Config;
use Test::Harness::Assert;
use Test::Harness::Iterator;
use Test::Harness::Point;
# Flags used as return values from our methods. Just for internal
# clarification.
my $YES = (1==1);
my $NO = !$YES;
=head1 NAME
Test::Harness::Straps - detailed analysis of test results
=head1 SYNOPSIS
use Test::Harness::Straps;
my $strap = Test::Harness::Straps->new;
# Various ways to interpret a test
my %results = $strap->analyze($name, \@test_output);
my %results = $strap->analyze_fh($name, $test_filehandle);
my %results = $strap->analyze_file($test_file);
And the other system:
RHEL 4 - x86
[root@vdt-rhas4-ia32 tests]# perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi
Straps.pm:
# -*- Mode: cperl; cperl-indent-level: 4 -*-
package Test::Harness::Straps;
use strict;
use vars qw($VERSION);
$VERSION = '0.26';
use Config;
use Test::Harness::Assert;
use Test::Harness::Iterator;
use Test::Harness::Point;
use Test::Harness::Results;
# Flags used as return values from our methods. Just for internal
# clarification.
my $YES = (1==1);
my $NO = !$YES;
=head1 NAME
Test::Harness::Straps - detailed analysis of test results
=head1 SYNOPSIS
use Test::Harness::Straps;
my $strap = Test::Harness::Straps->new;
# Various ways to interpret a test
my $results = $strap->analyze($name, \@test_output);
my $results = $strap->analyze_fh($name, $test_filehandle);
my $results = $strap->analyze_file($test_file);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.