Hi monks
I have a bit of a strange problem:
I have written an OOP program (hc_url.pm) that uses a function from another program (ml_lwp_wrapper), called call_httpd_exec. It gets the other program with "require". This works fine. My problem is that I now need to make this program create a new object, that also wants to use the same function from ml_lwp_wrapper (also retrieved with require). However, when I run the program, I get this message:
Undefined subroutine &hc_url::call_httpd_exec called at /exlibris/meta
+lib/m4_b/dat01/vir_ext/hc_url.pm line 166.
I know that this is a bit complicated, but the basic outcome is that the original program doesn't recognize the function anymore!! Does anyone know why this is the case, and what I can do to solve this problem?
Thanks in advance
Guy (mrguy123)
Update: What the programs does isn't very important. The main thing is that both programs have this code in them:
require "ml_lwp_wrapper";
&call_httpd_exec($hash);
Problem is, when the first program creates an instance of the second program
my $authen = ml_authen->new(\%params);
the first program can't use the function anymore
Update 2: I added 4 snippet programs in the reply section. You can download them and get the same error message (just change the Perl path)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.