snoofkin
snoofkin

Reputation: 8895

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 deprecated?

Thanks,

Upvotes: 0

Views: 229

Answers (1)

Stuart Watt
Stuart Watt

Reputation: 5401

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.

Upvotes: 3

Related Questions