开发者

use base instead of parent in DBIx::Class

Any idea why the DBIx::Class uses use base instead of use parent?

see this for instance.

Correct me i'm wrong, but isn't it use base dep开发者_Go百科recated?

Thanks,


For compatibility with older Perls. use parent was added in 5.10, but DBIx::Class still supports Perl 5.8.

Technically, the perldocs state that use base is "discouraged" rather than formally deprecated, implying that it is certainly not going to go away any time soon. But if you know your code is targeting Perl 5.10, use parent is better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜