mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Add "mob" to perl-doc-parser.pl
This commit is contained in:
parent
214503617e
commit
332a3d6c6a
@ -1,6 +1,21 @@
|
|||||||
use File::Find;
|
use File::Find;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
|
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 " --all - Prints methods for all classes\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($#ARGV < 0) {
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
my $export = $ARGV[0];
|
||||||
|
$export=~s/--//g;
|
||||||
|
|
||||||
my @files;
|
my @files;
|
||||||
my $start_dir = "zone/";
|
my $start_dir = "zone/";
|
||||||
find(
|
find(
|
||||||
@ -14,6 +29,13 @@ for my $file (@files) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#::: If we are specifying a specific class type, skip everything else
|
||||||
|
if ($export ne "all" && $export ne "") {
|
||||||
|
if ($file!~/$export/i) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@methods = ();
|
@methods = ();
|
||||||
|
|
||||||
#::: Open File
|
#::: Open File
|
||||||
@ -23,10 +45,19 @@ for my $file (@files) {
|
|||||||
chomp;
|
chomp;
|
||||||
$line = $_;
|
$line = $_;
|
||||||
|
|
||||||
if ($line=~/Client::/i) {
|
if ($line=~/Client::|Mob::/i && $line=~/_croak/i) {
|
||||||
|
|
||||||
$split_key = "Client::";
|
#::: Client export
|
||||||
$object_prefix = "\$client->";
|
if ($export=~/all|client/i) {
|
||||||
|
$split_key = "Client::";
|
||||||
|
$object_prefix = "\$client->";
|
||||||
|
}
|
||||||
|
|
||||||
|
#::: Mob export
|
||||||
|
if ($export=~/all|mob/i) {
|
||||||
|
$split_key = "Mob::";
|
||||||
|
$object_prefix = "\$mob->";
|
||||||
|
}
|
||||||
|
|
||||||
#::: Split on croak usage
|
#::: Split on croak usage
|
||||||
@data = split($split_key, $line);
|
@data = split($split_key, $line);
|
||||||
|
|||||||
@ -7183,7 +7183,7 @@ XS(XS_Mob_IsRunning); /* prototype to pass -Wmissing-prototypes */
|
|||||||
XS(XS_Mob_IsRunning) {
|
XS(XS_Mob_IsRunning) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items != 1)
|
if (items != 1)
|
||||||
Perl_croak(aTHX_ "Usage: Mob:::IsRunning(THIS)");
|
Perl_croak(aTHX_ "Usage: Mob::IsRunning(THIS)");
|
||||||
{
|
{
|
||||||
Mob *THIS;
|
Mob *THIS;
|
||||||
bool RETVAL;
|
bool RETVAL;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user