Teach compiler.pl about more AceAddon methods.
Johnny C. Lam [10-17-12 - 16:07]
Teach compiler.pl about more AceAddon methods.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@603 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/compiler.pl b/compiler.pl
index 2cfce11..e40b8be 100644
--- a/compiler.pl
+++ b/compiler.pl
@@ -92,11 +92,17 @@ while (defined($r = readdir(DIR)))
}
}
- if ($content =~ m/$class\s*=\s*LibStub/)
+ if ($content =~ m/$class\s*=\s*LibStub\(([^)]+)\)/)
{
- $pm{'RegisterEvent'} = true;
- $pm{'UnregisterEvent'} = true;
- $m{$class}{Print} = true;
+ if ($1 =~ m/AceAddon/)
+ {
+ $m{$class}{Print} = true;
+ $m{$class}{RegisterEvent} = true;
+ $m{$class}{UnregisterEvent} = true;
+ $m{$class}{RegisterMessage} = true;
+ $m{$class}{UnregisterMessage} = true;
+ $m{$class}{SendMessage} = true;
+ }
}
if ($content =~ m/<private-static-properties>(.*)<\/private-static-properties>/s)