Yes it's in Perl! See perldoc -m Exporter, but don't stare at it too hard before you're ready to understand and respect the smoke and mirrors revealed.
Thanks, it's definitely more complex then anything I've written...but it's not that bad to follow, you just need to understand typeglobs and the system table structure.