unbless 在 Perl 中的实现?
unbless implementation in Perl?
许多 Perl 开发人员都知道,unbless is used to remove the blessing from objects.
I am trying to understand how does it internally work by investigating its implementation.
I tried to check its implementation in its package Data::Structure::Util. Here's the Source:
sub unbless {
unbless_xs( $_[0] );
}
我在哪里可以找到 unbless_xs
sub implementation/source?
它是用C实现的,你可以在https://metacpan.org/source/ANDYA/Data-Structure-Util-0.16/Util.xs#L239
查看函数源
如果您在左侧查找 Data::Structure::Util
on metacpan.org you will see a Browse link,您将可以探索分发的内容
这同样适用于任何 CPAN 模块:无需下载来检查源代码。在这种情况下,您会在结构的根部找到 Util.xs
如果您愿意,您可以在 CPAN 站点上做同样的事情 search.cpan.org
但您必须提升到(当前)Data-Structure-Util-0.16 发行版才能找到浏览器 link
许多 Perl 开发人员都知道,unbless is used to remove the blessing from objects.
I am trying to understand how does it internally work by investigating its implementation.
I tried to check its implementation in its package Data::Structure::Util. Here's the Source:
sub unbless {
unbless_xs( $_[0] );
}
我在哪里可以找到 unbless_xs
sub implementation/source?
它是用C实现的,你可以在https://metacpan.org/source/ANDYA/Data-Structure-Util-0.16/Util.xs#L239
查看函数源如果您在左侧查找 Data::Structure::Util
on metacpan.org you will see a Browse link,您将可以探索分发的内容
这同样适用于任何 CPAN 模块:无需下载来检查源代码。在这种情况下,您会在结构的根部找到 Util.xs
如果您愿意,您可以在 CPAN 站点上做同样的事情 search.cpan.org
但您必须提升到(当前)Data-Structure-Util-0.16 发行版才能找到浏览器 link