1 package Acme
::Study
::Perl
;
9 our @EXPORT_OK = qw(studyperl);
15 Acme::Study::Perl - empirical studies about how perl behaves
19 use version
; our $VERSION = qv
('0.0.2');
23 use Acme::Study::Perl qw(studyperl);
24 studyperl("your expression goes here", "optional comment");
28 This module provides nothing that you cannot do yourself. Its focus
29 is the test suite. If cpantesters deliver what they promise, this
30 module's test suite can be used to study the behaviour of perl on
33 The single function C<studyperl> only does some trivial formatting
34 which will help deciphering the output of the testsuite.
38 My first descriptive table overview after I first released
39 Acme::Study::Perl was generated with the following command:
41 ctgetreports --q meta:perl -q conf:use64bitint -q conf:use64bitall --q qr:"(native big math float/int.*)" Acme-Study-Perl
43 The result showed me six perls that have a bug in their conversion of
44 strings to numbers and 28 perls that did it right. To find out more
45 about the parameters that might have an influence, I called
46 ctgetreports with --solve and --ycb (example in the ctgetreports
49 The calculation provided a hint that conf:ivtype is a candidate.
50 Looking closer helped confirm the finding that all perls with ivtype
51 C<long long> have this bug. And only one architecture with ivtype
52 C<long>, namely C<alpha-netbsd>. All others either provided the
53 correct result, C<-1> because they were native 64 bit processors or
54 the expected wrong-by-rounding result C<0>.
60 =head2 (void) studyperl ($expr, $comment)
62 Evals the expression and sends with the diag() command from Test::More
63 a terse Data::Dumper representation for STDERR.
65 So far we have defined four characters as hash keys per study:
72 We have configured Data::Dumper to write one line and sort the keys.
77 my($expr, $comment) = @_;
80 my @err = $err ?
('@' => $err) : ();
81 my @comment = $comment ?
("#" => $comment) : ();
83 $Test ||= Test
::Builder
->new;
84 $Test->diag(Data
::Dumper
->new([{"<"=>$expr, ">"=>$out, @comment, @err}])
85 ->Sortkeys(1)->Indent(0)->Useqq(1)->Terse(1)->Dump);
91 Andreas König, C<< <andreas.koenig.7os6VVqR at franz.ak.mind.de> >>
95 Please report any bugs or feature requests through the web interface
96 at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Study-Perl>.
97 I will be notified, and then you'll automatically be notified of
98 progress on your bug as I make changes.
102 You can find documentation for this module with the perldoc command.
104 perldoc Acme::Study::Perl
106 You can also look for information at:
110 =item * RT: CPAN's request tracker
112 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-Study-Perl>
114 =item * AnnoCPAN: Annotated CPAN documentation
116 L<http://annocpan.org/dist/Acme-Study-Perl>
120 L<http://cpanratings.perl.org/d/Acme-Study-Perl>
124 L<http://search.cpan.org/dist/Acme-Study-Perl>
128 =head1 ACKNOWLEDGEMENTS
130 Thanks to RJBS for Module::Starter.
132 =head1 COPYRIGHT & LICENSE
134 Copyright 2008 Andreas König.
136 This program is free software; you can redistribute it and/or modify it
137 under the same terms as Perl itself.
142 1; # End of Acme::Study::Perl