The other module works differently. XS generates the glue code anyway, so there's no real difference there. And the test against &PL_sv_undef isn't a test for definedness -- if you don't understand the code, and can't even read the comment explaining it, don't criticize it.
EDIT: I had a module in my library that I find useful, whose functionality was only available on CPAN with a clumsy mix of other modules, so I released it. I have others that, since I wrote them, have been supplanted by Scalar::Util or others, and I won't be releasing those because it would be pointless. But if "CPAN desperately needs it" is supposed to be the test, most of CPAN wouldn't exist.
I used SWIG because it's ten times easier than XS, and only marginally less efficient, which isn't important for this application. The "bloat" is only visible because, unlike XS, you have to include the glue code to avoid a build-time dependency on SWIG. It's irrelevant.
SWIG passes arguments just fine. I defaulted the argument to &PL_sv_undef to help defend against unexpected input. It's silly to choke on unexpected input when it's trivial to defend against, and since the line of code I added could look confusing I added a comment explaining why it was there. If you thought there was something wrong with it, posting a snarky "review" instead of reporting a bug is not very helpful.
The refcount function is basically ref ? Devel::Refcount::refcount : Devel::Peek::SvREFCNT (which is possibly marginally useful), while refcount_sv is just the latter. But this module includes more than 50kB of SWIG-generated C code just to achieve what would ultimately require only a few lines of XS. And I'm not talking about testing definedness as "being different from &PL_sv_undef"... Ooops.
Next time you release a distribution, please search CPAN for similar modules first, and then ask advices at your favorite perl hackers' hangout.
Edit: I don't think the other modules work *that* differently CPAN needed desperately this distribution. I pointed to the possible replacements and they're quite short.
If you used SWIG because you didn't know XS, that's fine, but please don't say that XS is as heavily bloated as what you're bundling. It's just not.
As for the comment, it smells more of cargo-culting than real insight of what's going on. It's also a kludge to address a shortcoming in how SWIG passes arguments, which brings us to the previous problem.
Sorry, but using wrong tools for solving problems that are already solved doesn't really make me want to use this.