CPAN::...History(3pm)

πŸ“¦
version 1.2020 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– CPAN::Reporter::History β€” the girlies' guide πŸ’–

okay so bestie, welcome to CPAN::Reporter::History, aka the manual page for the lil module that lets you Read or write a CPAN::Reporter history log ✨ (yes that's the manual name up there, it's giving CPAN::...History(3pm) energy, iykyk 🫢)


🌸 VERSION 🌸

version 1.2020 β€” that's the one, no cap πŸ’…


✨ SYNOPSIS ✨

like, the whole vibe in four lines:

use CPAN::Reporter::History 'have_tested';

@results = have_tested( dist => 'Dist-Name-1.23' );

that's it. that's the tea πŸ“


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the interface for interacting with the CPAN::Reporter history file. Most of the methods in here are private β€” meaning they're only for use within CPAN::Reporter itself, so don't go poking at them, they're not for you bestie πŸ™ˆ. BUT. There is a public function provided so you can query the history file for results, and honestly? obsessed 😍


πŸ‘‘ USAGE πŸ‘‘

here's the function that's available. it is NOT exported by default β€” so you gotta ask for it by name, periodt.

🧚 have_tested()

# all reports for Foo-Bar-1.23
@results = have_tested( dist => 'Foo-Bar-1.23' );

# all NA reports
@results = have_tested( grade => 'NA' );

# all reports on the current Perl/platform
@results = have_tested();

what it does: searches the CPAN::Reporter history file for records that exactly match your search criteria, which you pass in as pairs of field-names and desired values. slay πŸ’–

🌈 Ordinary search criteria

  • dist β€” the distribution tarball name, without any filename suffix. if you've got a CPAN::Distribution object, this is what its base_id method hands you. iconic.
  • phase β€” the phase the report was generated during: either 'PL', 'make' or 'test' πŸ’«
  • grade β€” the CPAN Testers grade: 'PASS', 'FAIL', 'NA' or 'UNKNOWN'. It may also be 'DISCARD', which covers any failing reports that weren't sent due to missing prerequisites πŸ‘€
⚠️ heads up: without additional criteria, a search is limited to the current version of Perl and the current architecture and OS version. so if you're expecting everything, you're not getting everything, bestie 😭

You can specify additional criteria explicitly β€” or, by handing over the empty string, q{}, you'll match that field for any record. main character move honestly:

# all reports for Foo-Bar-1.23 on any version of perl
# on the current architecture and OS version
@results = have_tested( dist => 'Foo-Bar-1.23', perl => q{} );

πŸ’… These additional criteria include:

  • perl β€” the perl version and possible patchlevel. this will be dotted decimal (5.6.2) starting with version 5.6, or will be numeric style as given by $] for older versions. if a patchlevel exists, it must be specified similar to "5.11.0 patch 12345"
  • archname β€” platform architecture name, as given by $Config{archname}
  • osvers β€” operating system version, as given by $Config{osvers}

The function returns an array of hashes, each one representing a test result, with all of the fields listed above. so cute, so useful πŸŽ€


πŸ”₯ SEE ALSO πŸ”₯

  • CPAN::Reporter
  • CPAN::Reporter::FAQ

go read them, they ate πŸ’€βœ¨


🫢 AUTHOR 🫢

David Golden <dagolden@cpan.org> β€” king behaviour, we love to see it πŸ‘‘


This software is Copyright (c) 2023 by David Golden.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

okay that's the whole page bestie, you're officially educated πŸŽ“βœ¨

signing off with the deets: this is perl v5.40.0, dated 2024-08-17, and it's the CPAN::...History(3pm) page from the User Contributed Perl Documentation πŸ’– stay slaying, go write some test reports 🌸

πŸ“¦ where this page comes from