In your original post, you say that the code within the modules is the exact same except for the mysql authentication. That sets off red alerts all around within my head. What happens if you need to change the code for one or more of the subroutines within these modules? You'll have to go tyhrough every single one, making the changes. My question to you is why you are using a separate module if all that differs is usernames/passwords? Use only one module. When you load it, either pass the username and password pair to the module to make the connection, or make the module retrieve this information itself, based on a parameter passed to it. Please please please don't copy the same module to a separate file just to change two variables. Find a way to pass the authentication information to the module. This will narrow everything down to one module, which will make readability, coding-friendly, and maintainable/manageable code. Besides, I bet that doing so will eliminate or narrow down the problem with the double-declared subroutine.


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, reply to this node or /msg me to tell me what is wrong with the post, so that I may update the node to the best of my ability. If you do not inform me as to why the post deserved a downvote, your vote does not have any significance and will be disregarded.


In reply to Re^3: Error in Syntax... by Coruscate
in thread Error in Syntax... by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.