# perldoc > HTML::Mason::Component::Subcomponent

## NAME
    [HTML::Mason::Component::Subcomponent](https://www.chedong.com/phpMan.php/perldoc/HTML%3A%3AMason%3A%3AComponent%3A%3ASubcomponent/markdown) - Mason Subcomponent Class

## DESCRIPTION
    This is a subclass of [HTML::Mason::Component](https://www.chedong.com/phpMan.php/perldoc/HTML%3A%3AMason%3A%3AComponent/markdown). Mason uses it to implement both subcomponents
    (defined by "<%def>") and methods (defined by "<%method>").

    A subcomponent/method gets most of its properties from its owner. Note that the link from the
    subcomponent to its owner is a weak reference (to prevent circular references), so if you grab a
    subcomponent/method object, you should also grab and hold a reference to its owner. If the owner
    goes out of scope, the subcomponent/method object will become unusable.

## METHODS
    is_method
        Returns 1 if this is a method (declared by "<%method>"), 0 if it is a subcomponent (defined
        by c<< <%def> >>).

    owner
        Returns the component object within which this subcomponent or method was defined.

