Skip to content

Commit

Permalink
Create (undocumented) ModuleObjects for each step in the heirarchy.
Browse files Browse the repository at this point in the history
This allows the Yard output to properly fold namespaces.
  • Loading branch information
pvande committed Apr 16, 2010
1 parent f7552c3 commit 4becfbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/yard/handlers/perl/package_handler.rb
Expand Up @@ -2,6 +2,8 @@ class YARD::Handlers::Perl::PackageHandler < YARD::Handlers::Perl::Base
handles Package

process do
x = statement.namespace
register ModuleObject.new(x.namespace, x.name) until (x = P(x).parent).root?
$__PACKAGE__ = register ClassObject.new(P(statement.namespace), statement.classname)
end
end

0 comments on commit 4becfbb

Please sign in to comment.