Re: Relying more on Mouse

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <20111127114324.GO4556@Dago>
Ovid schrieb am 25.11.2011 um 23:58 (-0800):

> Rename TB2::Mouse to something like TB2::_U_R_A_MORON_FOR_USING_THIS_
> and I think the problem will take care of itself.

Or what about an addition to TB2::Mouse's import routine?

  sub import {
      # prevent unauthorised use
      my $calling_pkg = (caller)[0];
      croak __PACKAGE__ . ' is for internal use only'
          unless $calling_pkg =~ m/^(:?Test|TB2)::/;
      # or some other suitable usage policy check
      ...

Wouldn't that practically solve the hypothetical problem?

-- 
Michael Ludwig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.