sman has asked for the wisdom of the Perl Monks concerning the following question:

Hey guys,

Can I say the following two snippets have the same effect?

#[1] package Result::Item; use Moose; extends 'DBIx::Class::Core'; #[2] package Result::Item; use Moose; extends 'DBIx::Class'; __PACKAGE__->load_components( "Core" );

Replies are listed 'Best First'.
Re: Question about load_components()
by stvn (Monsignor) on Jan 23, 2010 at 00:34 UTC
    Can I say the following two snippets have the same effect?

    You could, but you might be totally wrong. I would do what the DBIx::Class manual says and what the test suite reflects. Anything else could break in the next release and/or have subtle bugs that you won't find until it is too late.

    -stvn
      Hi stvn,
      If you mean I could say they are nearly the same, my question will be "Why we choose to use the second one?" The first one is obviously more efficient because it has fewer lines than the 2nd one.
      Am I right about this?
        You appear to have only read the first two words of his reply. He proceeded to give four reasons.
Re: Question about load_components()
by ikegami (Patriarch) on Jan 22, 2010 at 23:19 UTC

    They *might* *currently* be equivalent...

    Why?