and this is a really simple example,
but if one is not adverse to playing with some globals, it seems doable.
(Albeit requiring writing a complete alternative to Test::Harness...)
Regards,
David Golden
-
### Tester.pm ###
package Tester;
use Exporter 'import';
our
Michael G Schwern wrote:
On Wed, Jan 26, 2005 at 05:55:24PM -0500, David Golden wrote:
While this simple example just has the test function shove a reference to a
hash onto a global array @{$Tester::RESULTS{$filename}}, the test function
could just as easily create an object (Test::Object::Ok
that returns a string with the output for
people to write custom tests against:
stdout_capture { fcn() };
Regards,
David Golden
James E Keenan wrote:
And here are the fruits of my application of IO::Capture: a module with
three subroutines which have proven useful in the project I'm working
Michael G Schwern wrote:
On Tue, Mar 08, 2005 at 02:54:46PM -0500, David Golden wrote:
Could we also consider moving away from singletons that are hard-wired
to Test::Builder? By that I mean make Test::Builder a 'factory' that
gives either a default, plain vanilla Test::Builder object or else
chromatic wrote:
On Tue, 2005-03-08 at 17:31 -0500, David Golden wrote:
Yeah, it would be nice if we had a better way to handle this. Perhaps
changing the idiom to:
$Test-ok( $dressed_up, 'How nice do you look?' ) ||
$Test-reason( 'Refusing to wear a tie and jacket
chromatic wrote:
On the other hand, it doesn't do anything differently with TAP as
currently defined, and I share Schwern's case of howling fantods at
recommending that people look in Test::Builder's test results list. Out
of process interpreting and reporting feels so much nicer.
An addendum
I was playfully suggesting that behind simply as an abstraction of what
Test::Builder and Test::Harness provide. No way would I inflict that on
an end-user!
David
Ofer Nave wrote:
David Golden wrote:
Just to be playful with concepts:
* Test::Answer -- holds the details of a particular test
Ken Williams wrote:
On Mar 30, 2005, at 6:16 PM, Michael G Schwern wrote:
On Wed, Mar 30, 2005 at 05:53:37PM -0500, Randy W. Sims wrote:
Should we completely open this up so that requires/recommends/conflicts
can be applied to any action?
install_recommends = ...
testcover_requires = ...
etc.
of how test reporting is
done. Make it a user choice, not a mandated action.
Ironically, for all the skeptical comments about why a scoreboard --
the fact that many people care about the Kwalitee metric suggests that
it does serve some inspirational purpose.
Regards,
David Golden
equivalent to a trinary operation $p ? $p : $q (ignoring potential
side effects) and thus the truth table in this situation only needs to
include the first operand, thus avoiding the false-alarm.
Regards,
David Golden
the program to evaluate $q as true or
false.
I guess that begs the question for coverage testers which case is more
common -- caring only that $p || $q takes on the value of $p and $q,
or caring that both $p and $q take on both true and false values.
Regards,
David Golden
perlguts well enough to say.
Regards,
David Golden
want to edit a folded pod section, zo opens
a fold and zc closes it. zn opens them all and zN closes them all.
Makes inline pod less frustrating, particularly if you write lengthy docs.
Regards,
David Golden
directly. Maybe
after the 0.27 release.
Regards,
David Golden
cycles on it, more power to them.
Regards,
David Golden
and just have
bad_perl_dependency fail if there is no perl dependency listed. I.e.,
assume that no perl dependency is equivalent to use perl 0 or maybe some
arbitrarily old version of perl 5 (e.g. 5.004).
Regards,
David Golden
matters. Some of that might be useful for
installers, and some not. But if CPANTS itself didn't offer a Kwalitee
score -- just the results of the tests -- there wouldn't be an implicit
sanction of a single metric that gets people so riled up.
Regards,
David Golden
It can't be by the same author, though, to count for is_prereq, right?
So someone needs to create a new CPAN ID, and release a module under that ID
that prereqs all of CPAN. Then we'd all get our prereq points.
Probably could be done with a Build.PL that pulls the full module list then
Ovid wrote:
--- David Golden [EMAIL PROTECTED] wrote:
It can't be by the same author, though, to count for is_prereq,
right?
Nope. http://cpants.perl.org/dist/Lingua-EN-NameParse.
Yup. (I think.) Listed as a prereq by Lingua-EN-MatchNames by BRIANL.
http://cpants.perl.org/dist/Lingua
Adam Kennedy wrote:
Ditch the CPANTs elements that a fail-by-default. By that I mean
has_test_pod_coverage, is_prereq and possibly also has_test_pod.
Or make is_prereq SO easy to game that it's a nonissue? Why should a
module depended upon by another author be ranked any higher than one
that
At least one of the culprits may be Test::Exception, for any version before
0.20. The problem is that CPANPLUS doesn't currently play well with
Module::Build and doesn't respect the build_requires parameter, but only
looks at the requires parameter. So you'll get unexpected failures for
tests, a Changes file with See
DBI::Changes or See Readme would satisfy the kwalitee test. It a hack to
satisfy the metric, but has the side benefit of actually providing a
consistent place for someone to track down the actual location of the change
log.
Regards,
David Golden
a polite question is wonderful (with potential answers ranging from
sure to hey, that's a cool idea, let's try a merge instead of a fork).
After the recent CPANPLUS::Dist::Build debacle, a little politeness in the
community is nice to see.
David Golden
::Harness count as a module of consequence?
- David Golden
Adam Kennedy wrote:
What about a special environment variable, like RUN_PRIVATE_TESTS?
I've been working on a concept of taggable tests on some of my larger
commercial stuff, integrating with the Test::More skip() function, and
some form of environment variables does indeed seem the best
Before I flounder around to figure this out, I hope that a quick message to
the list can offer some guidance.
I've got a bunch of test files for a distribution that run a script that
comes with the distribution. I'd like to test my coverage against that
script. I figure that I can just pass
Paul Johnson wrote:
On Wed, Nov 16, 2005 at 05:46:34PM -0500, David Golden wrote:
I've got a bunch of test files for a distribution that run a script that
comes with the distribution. I'd like to test my coverage against that
script. I figure that I can just pass -MDevel::Cover
/usr/lib/perl5/vendor_perl
.
Insights and suggestions are greatly appreciated.
Regards,
David Golden
James E Keenan wrote:
What happens with: prove -vb t/sort_bug.t
It was in the next section via make with TEST_VERBOSE. Subtests
complete successfully then the test dies.
t/sort_bug1..2
# parent 2267: continue
# kid 1 before eq_set
# parent 2267: continue
# parent 2267: waiting for
convention that most people follow (e.g.
t::Foo::Bar).
I've personally come to like the t::Foo::Bar style as it is
immediately obvious that the module in question is test-related. It's a
handy affordance.
Regards,
David Golden
Adam Kennedy wrote:
Whether or not that is a transient thing that lasts for a week, or a
serious and ongoing problem, I think it's still worth it.
But that would require regular scanning -- otherwise I might get the
point one week and then a dependency might upgrade in a way that is
borked.
Chris Dolan wrote:
writing fragile META.yml creation code. YAML.pm is not even at 1.00
yet, so an API change is allowed by convention, and lack of
Convention? On CPAN? Are you kidding? By that logic, many of the
commonly used tools on CPAN could change API and your answer would be
oh,
Adam Kennedy wrote:
And therein lies the problem.
Working out when a dependency is important and when it's useless, or
vanity, or lazyness (good or bad) or whatever requires a human judgment
call.
So we can't really do anything about it.
Is it OK to use a lot of dependencies if they all
demerphq wrote:
On 1/30/06, David Cantrell [EMAIL PROTECTED] wrote:
Adam Kennedy wrote:
A testing system should only be sending FAIL reports when it believes it
has a platform that is compatible with the needs of the module, but when
it tries to install tests fail.
So how, then, do I tell
David Cantrell wrote:
David Golden wrote:
What's a clean, generic mechanism for a distribution to signal please
check this dependency and abort if it's not satisfied?
die(wrong platform, you didn't read the documentation\n)
unless(
$Config::capabilities{filesystem}{casesensitive
of Scalar::Util that doesn't
have refaddr. (Which is surprising, since they offer an updated one in
their repository.) To date, I haven't even received a ticket response
acknowledging receipt of my message, much less a fix.
A copy of my email follows:
David Golden wrote:
Dear ActiveState PPM
would like to see examples of how I have used it, look at the
test files for ExtUtils::ModuleMaker::TT -- particularly
t/20_makeperlmod.t and t/CLI.pm.
Best of luck,
David Golden
Testers results page.
Again, I don't think overwriting is a good idea. What if some
dependency module was changed and caused the module to fail/succeed
differently than before? That's important to know. Different results
from the same tester is *valuable* data, not erroneous.
Regards,
David
A. Pagaltzis wrote:
* David Golden [EMAIL PROTECTED] [2006-03-13 23:05]:
This issue also has frustrated me for some time, but I don't
think that we should be considering deleting reports. Reports
are just facts -- they have no value basis. Yes, people may make
judgments about the robustness
Adam Kennedy wrote:
For all those component distributions I consider it a failure if it is
so complex that you need something more than just three or four lines
from the SYNOPSIS.
Maybe there should be a Kwalitee metric for the length of the synopsis?
:-)
Regards,
David Golden
repository as
is (always building against the first release at that major) and just
*one* 8NX repository that always builds against the *latest* release
(whatever that is at any point in time).
Regards,
David Golden
in the Windows registry in order to finish upgrades during a reboot.
Thoughts and feedback welcome.
Regards,
David Golden
after
that, we take the next step.
That's good news. I hope the Schwern bottleneck clearly up soon.
Regards,
David Golden
demerphq wrote:
The point i was making is that it isnt actually necessary for Schwern
to do anything for you to enjoy the benefits of the new Install code.
[snip]
cpan install YVES/ex-ExtUtils-Install-1.3701.tar.gz
the you are cooking, with gas, right now. :-)
That's great, but I want
completion and the safety net against future
breakage still apply.
David Golden
do I expand the
tests to seek out invalid input, etc. And I mix this with some coverage
testing to ensure that I haven't inadvertently created defensive code
that wasn't actually part of passing a test. (Generally, conditional
branches not taken are what show up here.)
Regards,
David Golden
Randy W. Sims wrote:
Yep, that's ridiculous. I used to see these questions a lot back when I
was answering mails on the beginner groups. People wanting to do things
that have already been done and widely tested, but everyone wants to
write their own in order to reduce dependencies.
sugar:
eval {
# do stuff;
};
# catch() upgrades non-object $@ to Exception::Class::Base
if ( catch my $err ) {
if ( $err-isa('My::Exception') ) {
# handle it
}
else {
$err-rethrow;
}
}
Regards,
David Golden
with a narrow set of well-defined, objective criteria,
then it can serve both purposes. Remove or refine the subjective or
hard-to-measure ones and the numerical gaming that doesn't change
apparent quality goes away.
Regards,
David Golden
Chris Dolan wrote:
is_prereq is usually a proxy metric for software maturity: if someone
thinks your module is good enough that he would rather depend on it than
reinvent it, then it's probably a better-than-average module on CPAN.
is_prereq is usually a vote of confidence, so it is likely a
of test fixtures where subroutine X with tests calls
subroutine Y with tests. Or a loop calls a subroutine with tests. It
would be intuitive to group and nest those.
David Golden
(as it currently points to a missing spec file, no less).
Thank you all very much,
Regards,
David Golden
hacking.
David Golden
In the last day or so, every time I go to rt.cpan.org, it seems to
nearly finish loading a page and then just stalls.
Deleting the cookie for it seemed to help briefly, and then it stalled
again after submitting a bug report.
Are others experiencing difficulty?
Regards,
David Golden
the formative project at his public repository:
http://tinyurl.com/g888h
Perhaps you can join forces with him and help push some collective
project towards a release.
Regards,
David Golden
chromatic wrote:
Why is there not a Bundle::PerlPlus (and yes, I've lathered up my yak with
that name) that downloads and installs the modules that should have been in
the box?
For one, that should be Task::PerlPlus. :-)
Second, for any pre-packaged distribution like Strawberry Perl (see
as issues are
discovered. Many of the issues that module users have are that all they
have is some old version of core Perl with out-of-date CPAN.pm and
EU::MM that are buggy. And they're stuck. That's what M::I is trying
to solve.
Regards,
David Golden
for fun and strikeprofit/strike
* Laugh at code that gets its slashes wrong
(*cough* Test::Pod *cough*)
(*cough* Template Toolkit*cough*)
/shameless_plug
Regards,
David Golden
Andy Lester wrote:
On Jul 19, 2006, at 4:13 AM, David Golden wrote:
* Laugh at code that gets its slashes wrong
(*cough* Test::Pod *cough*)
I thought I'd fixed your slashie problems long ago. No? Please lean on
me if not.
http://rt.cpan.org/Public/Bug/Display.html?id=17892
demerphq wrote:
On 7/19/06, David Golden [EMAIL PROTECTED] wrote:
* Laugh at code that gets its slashes wrong
Thats a strange one, how often is this really a problem on win32? I
cant think of many times when thats been a problem.
It's not so much the frequency as the fact that it hits
the quality point for
each of the metrics, how would that graph trend over time? More use
strict? More META.yml? More README?
Regards,
David Golden
compatibility. I think that the
version object should be stringified when added to META.yml.
Regards,
David Golden
John Peacock wrote:
David Golden wrote:
[cc'd to perl-qa for awareness of the issue]
The switch to version objects in Module::Build means that the generated
META.yml now has this:
Is this with or without YAML itself loaded (so I know where to start)?
I did a little digging and this line
Steffen Mueller wrote:
John Peacock schrieb:
David Golden wrote:
(Though technically, it really ought to check that the ref equals
Module::Build::Version).
No, that would be wrong too. Never test a ref() against a specific
object
class, since it paints you into a corner with inheritance
Regards,
David Golden
and emailing test reports whenever
tests are run via CPAN.pm.
Any other feedback or suggestions are greatly appreciated.
Regards,
David Golden
Ovid wrote:
tests finished
I like it. Backward compatible and elegant in its declarative style.
(Therefor probably too good to be true.)
Regards,
David Golden
Ovid wrote:
Are there any Test:: modules which test the STDERR output directly or something
like that?
* Test::Output
* IO::Capture
There are tests that specifically check what's being sent to STDERR (as
well as STDOUT). Of course, these modules intercept STDOUT and STDERR
to keep them
information from these tests as well?
They probably need to be run in the same process. What about using
Test::Output or IO::Capture to capture the output (and keep it from
Test::Harness) and just running the code with do code.pl?
Regards,
David Golden
/
I'm not convinced that you can get this idea to work short of caching
the full distribution directory or tarball at install-time and then
iterating through those using the actual Makefile.PL or Build.PL files
to prep and call tests.
Regards,
David Golden
Thomas Klausner wrote:
Maybe it would be reasonable to also check for a POD-Heading named
LICENSE, but that's definitly more error-prone.
If you're going that way, also check for a qr/LICENSE/i file in the
distribution directory.
Maybe this metric should even check if there's a license in
brian d foy wrote:
Thinking about this further and talking to a few people about it, the
only place that makes any sense is the source code file itself. After
installation, the rest of the distribution will disappear. The license
has to stay with the source.
Nit -- .pod files also stay around
, then it should be written as a normal test of the failure
case.
TODO means don't have the result of this test affect the outcome yet.
Regards,
David Golden
* assumptions of unix command tool availability
* signal handling
I think authors need to aim to have the quality of test code be the same
as the quality of module code. (Though I'll admit that I don't always
live up to that standard myself.)
Regards,
David Golden
or Test::Output used
that method instead of ties so they could be used with external
processes, too.
In the meantime, I'd suggest trying it with IPC::Run3, which should do
the right thing.
Regards,
David Golden
David Cantrell wrote:
clearly. So my attempt to make my tests good will mostly consist of
applying the same coding standards to the test suites as I do to the
rest of the code.
OK, Lazy Web, who's going to write Test::Test::Perl::Critic?
:-)
Any tips on what - other than
I assume the idea behind not taking things off is to keep the history
available for future reference. Even if someone deletes an old
tarball of CPAN, I want to see the test history for it. I look not
only at current versions, but at past versions for judging robustness.
If a modules is renamed
prioritize?
Regards,
David Golden
that changes is the intro message (Congratulations! Tests were
successful or Unfortunately, problems were found).
Regards,
David Golden
) that distinguishes these cases? Or something else
entirely
Before I hack something into CPAN::Reporter and CPAN.pm, I'd like to
get some community consensus, particularly from those involved in CPAN
Testers.
Regards,
David Golden
P.S. As a side note, Chorny (from win32.perl.org and #win32
very much.
Regards,
David Golden
and hands to CPAN::Reporter. Or even just
use qr/^\S*make/ -- though the fuzzier the string the more I worry about
false positives.
Regards,
David Golden
On 9/28/06, Uwe Voelker [EMAIL PROTECTED] wrote:
debian% make
perl -e die
Died at -e line 1.
make: *** [all] Fehler 255
It's a Debian Etch with German locale.
Of course. Locales. It all seemed too easy.
Time for plan B.
David
can't detect a failure for
other
reasons. E.g. if t/*.t had a failure and there is also a test.pl, I don't
rerun test.pl.
Regards,
David Golden
with thousands of emails or don't subscribe to the list and accept that your
test reports won't show up immediately. Personally, I have a dummy e-mail
address I use for cpan-testers and use it to filter all test reports except
my own.
Regards,
David Golden
On 10/2/06, Jonathan Rockway [EMAIL PROTECTED] wrote:
CPAN Test reports follow a fairly rigid format that computers can easily
detect. I think it's worth auto-whitelisting messages that look like
FAIL Foo::Bar 3.14_15 or PASS Hello::World 2.71. The CPAN::Reporter
(?) and CPANPLUS mails look
On 10/3/06, Joshua ben Jore [EMAIL PROTECTED] wrote:
Fine, I just didn't feel like inventing a list on the spot. There's a
list of values we know perl uses internally. I see David missed
LANGUAGE, LC_ALL, and LANG.
You'd want to be careful not to do qr/^PERL/ because MACPERL doesn't
match that
I think this thread is headed towards completely over-engineering this.
For those who really want to customize what gets run when, I think brian's
Test::Manifest solution looks like a winner.
WIth environment variables, I prefer simplicity:
* AUTOMATED_TESTING -- signals that it's
See Win32::TieRegistry
http://search.cpan.org/dist/Win32-TieRegistry
Regards,
David Golden
On 17 Oct 2006 07:33:16 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I am on a fact finding mission.
Can Perl be used to update a value in the Windows Registry? If so,
does anyone have sample
or META.yml.
Regards,
David Golden
That scores the extra point. And so what?
I'd be much more interested in seeing effort put into things like
checking if detectable prerequisites are listed in the META.yml.
Regards,
David Golden
On 10/30/06, Andreas J. Koenig [EMAIL PROTECTED] wrote:
On Tue, 31 Oct 2006 00:23:09 +0200, Gabor Szabo [EMAIL PROTECTED]
said:
The mapping of flag to Module-Version pairs could actually reside on any
server with ftp or http access. CPAN.pm would be configured to use such
a URL.
On 10/31/06, Gabor Szabo [EMAIL PROTECTED] wrote:
In a way this is what Linux distros do or ActiveState does, but I
would like to do it
on CPAN level and still in source code.
As a start I could possibly creat a minicpan for particular modules
and their cross-tested
versions.
Does this make
On 11/2/06, Chris Dolan [EMAIL PROTECTED] wrote:
It's not an EU::MM bug -- it's a new M::B feature.
What should you do? You're not going to like this answer:
Don't use recursive test directories. :-)
Chris
Does Test::Manifest support nested test files? If so, that might be
an alternative.
On 11/3/06, Christopher H. Laco [EMAIL PROTECTED] wrote:
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
The one caution I'd give is around no_index. The spec always called
for dir for directories, but CPAN/PAUSE were checking for
directory
On 11/5/06, Steffen Mueller [EMAIL PROTECTED] wrote:
How about a mandatory or optional metric for modules registered with the
modules list? Why is that a sign of (q|kw)alit(y|ee)? Because it means
the author has the blessing of the module list maintainers as far as the
choice of namespace goes.
On 11/6/06, Michael G Schwern [EMAIL PROTECTED] wrote:
And realistically, Ken, Adam and I (maintainers of the major install tools)
really control most of the META.yml generation anyway. If we don't upgrade,
you don't upgrade.
Well, that's not entirely true for things like no_index or
On 1/5/07, Andy Lester [EMAIL PROTECTED] wrote:
On Jan 5, 2007, at 1:28 PM, Nicholas Clark wrote:
Failed Test | Total | Fail | List of Failed | TODO Passed
+---+--++
t/bar.t | 13| 4|2, 6-8 |3-4
On 1/5/07, Ovid [EMAIL PROTECTED] wrote:
Moreover, it looks really horrid with non-monospaced fonts.
You use non-monospaced fonts in your terminal? :)
Thta's gmail for you.
David
On 1/12/07, Shlomi Fish [EMAIL PROTECTED] wrote:
Yuval Kogman claimed that Module::Build generates CPAN testers reports with no
output from the test harness. Now, I released Math::GrahamFunction, which is
based on Module::Build, a few days ago and today received this failure error
report:
1 - 100 of 347 matches
Mail list logo