Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
知道为什么 DBIx::Class 使用use base而不是use parent?
use base
use parent
例如看到这个。
纠正我我错了,但它不是use base已弃用吗?
谢谢,
为了与旧的 Perls 兼容。use parent在 5.10 中添加,但DBIx::Class仍支持 Perl 5.8。
DBIx::Class
从技术上讲,perldocs 声明use base“不鼓励”而不是正式弃用,这意味着它肯定不会很快消失。但是如果你知道你的代码是针对 Perl 5.10 的,use parent那就更好了。