Class::Can(3pm)
π 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 π
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::ISADevel::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
- fedora 43: perl-Class-Can 0.01-45.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms