Class::Can(3pm)

πŸ“¦
version 0.01 Β· 2 versions
, in fedora 43

πŸ’– Class::Can β€” the manual page, but make it make sense πŸ’–

okay so bestie, you know how you're staring at a class like "what can you even do??" and nobody's telling you anything?? yeah. that's what this is for. Class::Can is that friend who knows everyone's business and will absolutely tell you. ✨


✨ NAME ✨

Class::Can β€” peek inside a class/method and find out what it can do (and, like, why it can do it) πŸ•΅οΈβ™€οΈπŸ’…


🌸 SYNOPSIS 🌸

the whole vibe in one little code block, no notes:

use Class::Can;
print Dumper { Class::Can->interrogate( 'Class::Can' ) };
__END__
$VAR1 = {
          'interrogate' => 'Class::Can'
};

see how Class::Can interrogated itself and the answer was just... interrogate β†’ Class::Can?? that's not a bug that's a serve 🫢 iconic honestly


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: Class::Can goes and interrogates the object heirarchy of a package β€” yes, it walks the whole family tree, the whole ancestry situation, main character energy β€” and hands you back a hash.

and what's in that hash?? listen:

  • the key is each method the class could dispatch β€” like, every method it might end up calling πŸ‘‘
  • the value is the package it found it in β€” so you know exactly where that method was living this whole time 🏠

basically: what it can do, and which package is claiming credit for it. no cap. πŸ’―


πŸŽ€ AUTHOR πŸŽ€

Richard Clamp <richardc@unixbeard.net> β€” the genius behind all this, giving us the receipts fr fr 🌟


Copyright 2004 Richard Clamp. All Rights Reserved.

and the legal bit, said with love: this program is free software β€” you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source, we love to see it 🫢🌈


🌈 SEE ALSO 🌈

if this page ate and you want more, go check out:

  • Class::ISA
  • Devel::Symdump

both lowkey also doing the most in this exact department πŸ’…


ngl bestie, if you ever forget what a class can do, just interrogate it. it's giving therapy but for code πŸ’€βœ¨

this lil page is from perl v5.42.0, dated 2025-07-25 β€” shoutout to that timestamp for being so punctual πŸ•πŸŽ€ mwah, go write something cute πŸ¦‹

πŸ“¦ where this page comes from