Loading ...
Sorry, an error occurred while loading the content.

Confusing behavior

Expand Messages
  • simon.fairey@ft.com
    Hi, I have a v.small test module but am getting odd behaviour, I m using mod_soap with Apache. My little Demo.pm is: package Demo; sub hi { return hello ; }
    Message 1 of 2 , Nov 7, 2002
    • 0 Attachment

      Hi,

      I have a v.small test module but am getting odd behaviour, I'm using mod_soap with Apache. My little Demo.pm is:

      package Demo;

      sub hi {
        return "hello";
      }

      sub bye {
        return "goodbye, cruel world";
      }

      1;

      and my client is:

      #!/bin/perl

        use SOAP::Lite +autodispatch =>
          uri => 'Demo',
          proxy => 'https://user:pass@blah/mod_soap',
          on_fault => sub { my($soap, $res) = @_;
            die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
          }
        ;

        print hi()."\n";


      This all works fine until I add say a use DBI; in my Demo package and then it still runs but I get no output?

      Am I missing something fundamental here?

      Si

      **********************************************************************************
      This email may contain confidential material. If you were not an
      intended recipient, please notify the sender and delete all copies.
      We may monitor email to and from our network.
    • Duncan Cameron
      ... Something similar came up a few weeks ago and I think that it was caused by SOAP::Lite disabling @INC, so unless you re doing something fancy with @INC,
      Message 2 of 2 , Nov 7, 2002
      • 0 Attachment
        On 2002-11-07 simon.fairey wrote:
        >Hi,
        >
        >I have a v.small test module but am getting odd behaviour, I'm using
        >mod_soap with Apache. My little Demo.pm is:
        >
        >package Demo;
        >
        >sub hi {
        > return "hello";
        >}
        >
        >sub bye {
        > return "goodbye, cruel world";
        >}
        >
        >1;
        >
        >and my client is:
        >
        >#!/bin/perl
        >
        > use SOAP::Lite +autodispatch =>
        > uri => 'Demo',
        > proxy => 'https://user:pass@blah/mod_soap',
        > on_fault => sub { my($soap, $res) = @_;
        > die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
        > }
        > ;
        >
        > print hi()."\n";
        >
        >
        >This all works fine until I add say a use DBI; in my Demo package and then
        >it still runs but I get no output?
        >
        >Am I missing something fundamental here?

        Something similar came up a few weeks ago and I think that
        it was caused by SOAP::Lite disabling @INC, so unless you're
        doing something fancy with @INC, then the 'use DBI;' is going to
        fail, see the 'Security' section in the docs.

        Regards,
        Duncan Cameron
      Your message has been successfully submitted and would be delivered to recipients shortly.