Other monks have given good advice, but I just want to be sure that incrementing the major version number is not forgotten in the process. Arguably, that and a nice notice in "Changes" should be all you need.
The fact that the changes also make the API usable without relying on undefined behavior is also an argument in your favor. Generally, croaking on failure is appropriate if any reasonable application will need the func(...) or die ... pattern as is seen with Perl's own open most of the time. On the other hand, simply returning failure is better if an application might want to continue with some alternate method, as this sample from a test I recently wrote does:
my $fh; open $fh, '<', \ $data or $fh = new IO::Uncompress::Gunzip (\ $data, Transparent => 1) or BAIL_OUT "cannot open string as file: $! $GunzipError";
That assumes that IO::Uncompress::Gunzip has its own XS magic for reading the contents of a scalar that is independent of the PerlIO infrastructure that the Perl core uses for that feature. So even if Perl was built without PerlIO, IO::Uncompress::Gunzip can still do it. (Other code in the module under test already relies on IO::Uncompress::Gunzip to decompress input data, so it was already in my PREREQ_PM list.)
In reply to Re: Minor API changes in 10-year-old module
by jcb
in thread Minor API changes in 10-year-old module
by wanna_code_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |