Hello,
Honestly, I have no idea what is going on here either. Your description of the problem '..it's kind of a maze..' seems to sum it up well. My first suggestion would be to use Data::Dumper to Dump the contents of every variable you can to make SURE that what you think you are doing is correct.
Additionally, I would consider completely rewriting the script and module because it is so messy. I wish I could help you more, but a lot of important things seem to be missing from your post- such as the logic sub 'Groups', 'USERID', etc.
Lastly, I would consider creating a test file with Test::Most while you rewrite this. If you want to be even more awesome to make the code maintainable, use Moose
http://search.cpan.org/~ether/Moose-2.1204/lib/Moose/Manual.pod :)
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.