On Jul 18, 2004, at 2:14 AM, Smylers wrote:

Also, David has an app that depends on something Pg-or-mysql-like;
suppose I do too, as do several other people.  When another
Pg-or-mysql-providing module appears it doesn't make sense for every
single one of us app authors to have to note this, tweak our install
settings, and upload a new version to Cpan; that's lots of duplicated
and redundant effort.

I think that this will be the exception, really, and it's not much of an onus for me to put something like this into my Build.PL:

  requires => {
    # Abstract package
    db_driver => [qw(postgresql mysql)]
  },

  abstract_packages => {
    postgresql => {
      DBD::Pg => 0,
      DateTime::Format::Pg => 0,
    },
    mysql => {
      DBD::mysql => 0,
      DateTime::Format::mysql => 0,
    },
  }

When someone adds Oracle support, then I'll be able to simply change it to:

  requires => {
    # Abstract package
    db_driver => [qw(postgresql mysql oracle)]
  },

  abstract_packages => {
    postgresql => {
      DBD::Pg => 0,
      DateTime::Format::Pg => 0,
    },
    mysql => {
      DBD::mysql => 0,
      DateTime::Format::mysql => 0,
    },
    oracle => {
      DBD::Oracle => 0,
      DateTime::Format::Oracle => 0,
    },
  }

And re-release. I don't think that's too duplicating. But even for those who do, I don't see why you wouldn't be able to simply build a bundle that has the above requirements in it, and then all your app has to do is require the bundle and its abstract requirements.

Regards,

David

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to