FAQ
Hi folks:

Working on deploying a Catalyst app on a customers machine.
Installation is going well ... until the Catalyst modules that depend
upon WWW::Mechanize and family come up.

As far as we can tell, the breakage is not the modules, but the
WWW::Mechanize (and therefore, by extension, things that use
WWW::Mechanize).

Is it possible to simply disable the use of this module during
installation and testing? This is on an internal customer-site machine,
with no easy access to the rest of the net, and WWW::Mechanize really
wants access to the rest of the net (with a whole lotta hardcoded tests
to wikipedia and other such things).

I could "force" it, but so many things seem to depend upon it for
testing ...

Advice, clues, pointers are welcome.

--
Joe Landman
landman@scalableinformatics.com

Search Discussions

  • Matt Lawrence at Nov 2, 2007 at 2:01 pm

    Joe Landman wrote:
    Hi folks:

    Working on deploying a Catalyst app on a customers machine.
    Installation is going well ... until the Catalyst modules that depend
    upon WWW::Mechanize and family come up.

    As far as we can tell, the breakage is not the modules, but the
    WWW::Mechanize (and therefore, by extension, things that use
    WWW::Mechanize).

    Is it possible to simply disable the use of this module during
    installation and testing? This is on an internal customer-site
    machine, with no easy access to the rest of the net, and
    WWW::Mechanize really wants access to the rest of the net (with a
    whole lotta hardcoded tests to wikipedia and other such things).

    I could "force" it, but so many things seem to depend upon it for
    testing ...

    Advice, clues, pointers are welcome.
    Depending on the exact nature of the tests, it might be possible to use
    Test::MockObject or similar to make the tests pass.

    Otherwise, if the relevant tests will skip when WWW::Mechanize can't be
    found (or can be made to), you can use Module::Mask or Devel::Hide to
    fool the system into thinking it's not there.

    HARNESS_PERL_SWITCHES=-MModule::Mask=WWW::Mechanize make test


    I should probably point out that I'm the Module::Mask author, just in
    the interests of full disclosure ;-)

    Matt
  • Jonathan Rockway at Nov 2, 2007 at 2:23 pm

    Matt Lawrence wrote:
    I should probably point out that I'm the Module::Mask author, just in
    the interests of full disclosure ;-)
    How is Module::Mask different from Devel::Hide?

    Regards,
    Jonathan Rockway


    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 370 bytes
    Desc: OpenPGP digital signature
    Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071102/d636c5c4/signature.pgp
  • Christopher H. Laco at Nov 2, 2007 at 2:39 pm

    Jonathan Rockway wrote:
    Matt Lawrence wrote:
    I should probably point out that I'm the Module::Mask author, just in
    the interests of full disclosure ;-)
    How is Module::Mask different from Devel::Hide?

    Regards,
    Jonathan Rockway
    Or Test::Without::Module?


    --
    Let them eat cake and false positives.

    -----BEGIN NSATT SNOOP BLOCK-----
    building bomb tower terrorist grenade c4 explosive plot hijack
    plane police feds white house guns dirty device convoy president
    war chemical death drop off mule undercover launch rocket drug
    covert cell cerin mass infidel Allah package subway mass
    ------END NSATT SNOOP BLOCK------

    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 187 bytes
    Desc: OpenPGP digital signature
    Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071102/9985d87a/signature.pgp
  • Wade Stuart at Nov 2, 2007 at 5:36 pm
    "Christopher H. Laco" <claco@chrislaco.com> wrote on 11/02/2007 09:39:31
    AM:
    Jonathan Rockway wrote:
    Matt Lawrence wrote:
    I should probably point out that I'm the Module::Mask author, just in
    the interests of full disclosure ;-)
    How is Module::Mask different from Devel::Hide?

    Regards,
    Jonathan Rockway
    Or Test::Without::Module?
    Seems obvious;

    Module::Mask is different from Devel::Hide as underlined.
    ^^^^^^ ^^^^
    and

    Module::Mask is different from Test::Without::Module as underlined.
    ^^^^^^ ^^^^

    =)


    -Wade
  • Matt Lawrence at Nov 5, 2007 at 2:50 pm

    Christopher H. Laco wrote:
    Jonathan Rockway wrote:
    Matt Lawrence wrote:
    I should probably point out that I'm the Module::Mask author, just in
    the interests of full disclosure ;-)
    How is Module::Mask different from Devel::Hide?
    The interface is different, Module::Mask has a slightly more flexible OO
    interface, but it does have some limitations that Devel::Hide doesn't.
    Plus Module::Mask can whitelist modules, which I don't think Devel::Hide
    supports.
    Regards,
    Jonathan Rockway
    Or Test::Without::Module?
    I wasn't aware of Test::Without::Module, but a quick look at the docs
    reveals that it doesn't support lexical scoping, whereas Module::Mask
    does support masking in a lexical scope (although not via import and
    unimport).


    Matt
  • Jonathan Rockway at Nov 5, 2007 at 3:02 pm

    * On Monday 05 November 2007 08:50:03 am Matt Lawrence wrote:
    Jonathan Rockway wrote:
    How is Module::Mask different from Devel::Hide?
    The interface is different, Module::Mask has a slightly more flexible OO
    interface, but it does have some limitations that Devel::Hide doesn't.
    Plus Module::Mask can whitelist modules, which I don't think Devel::Hide
    supports.
    Why not consolidate the features of these three modules into one?

    Regards,
    Jonathan Rockway
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: not available
    Type: application/pgp-signature
    Size: 307 bytes
    Desc: This is a digitally signed message part.
    Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071105/95689428/attachment.pgp
  • Matt Lawrence at Nov 5, 2007 at 6:13 pm

    Jonathan Rockway wrote:
    * On Monday 05 November 2007 08:50:03 am Matt Lawrence wrote:
    Jonathan Rockway wrote:
    How is Module::Mask different from Devel::Hide?
    The interface is different, Module::Mask has a slightly more flexible OO
    interface, but it does have some limitations that Devel::Hide doesn't.
    Plus Module::Mask can whitelist modules, which I don't think Devel::Hide
    supports.
    Why not consolidate the features of these three modules into one?
    One of the features of Devel::Hide is that it doesn't load any other
    modules itself, so it can prevent pretty much anything from loading,
    whereas Module::Mask does load a few things (like Scalar::Util and Carp)
    which it therefore cannot mask. It seems to me that these approaches are
    pretty much mutually exclusive.

    Another point is that Devel::Hide will work on perls older than 5.8, by
    using tempfiles instead of coderefs in @INC. This is obviously
    incompatible with whitelisting, and might prove to be difficult to
    implement cleanly with lexical masks.

    Cheers,

    Matt

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedNov 2, '07 at 12:12a
activeNov 5, '07 at 6:13p
posts8
users5
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase