Add corpse to perl-doc-parser.pl

This commit is contained in:
Akkadius 2018-07-01 19:36:57 -05:00
parent 88ed2e64bb
commit b87e355db3

View File

@ -5,6 +5,7 @@ sub usage() {
print "Usage:\n";
print " --client - Prints methods for just client class methods\n";
print " --mob - Prints methods for just mob class methods\n";
print " --corpse - Prints methods for just corpse class methods\n";
print " --all - Prints methods for all classes\n";
exit(1);
}
@ -45,7 +46,7 @@ for my $file (@files) {
chomp;
$line = $_;
if ($line=~/Client::|Mob::/i && $line=~/_croak/i) {
if ($line=~/Client::|Mob::|Corpse::/i && $line=~/_croak/i) {
#::: Client export
if ($export=~/all|client/i) {
@ -59,6 +60,12 @@ for my $file (@files) {
$object_prefix = "\$mob->";
}
#::: Corpse export
if ($export=~/all|corpse/i) {
$split_key = "Corpse::";
$object_prefix = "\$corpse->";
}
#::: Split on croak usage
@data = split($split_key, $line);
$usage = trim($data[1]);