in reply to Re^4: Switch.pm Failure
in thread Switch.pm Failure

The only way that this Switch { ... } block would make sense is if somewhere there was a sub Switch (&), either defined in the code or coming from a module. However, it's not coming from the Switch module nor, at least as far as I can tell, CGI::Switch. I suspect you may have omitted the source of this Switch from the code you posted, since I also don't see where the manageusers package is coming from. And by the way, is it uppercase Switch, or lowercase switch like in the root node?

Unfortunately, what you've posted so far is not enough information to help you further. Please try to reduce the amount of code needed to reproduce the problem into a Short, Self-Contained, Correct Example. Also a good read is How do I post a question effectively? and I know what I mean. Why don't you?

Also, assuming you were the one who posted this anonymously:

I don't see the post How long does it take a moderator to approve or does that occur ordid I screw up?

Posts should appear immediately, if they do not, something probably went wrong.

Replies are listed 'Best First'.
Re^6: Switch.pm Failure
by huck (Prior) on Feb 25, 2017 at 18:19 UTC

    "The only way that this Switch { ... } block would make sense is if somewhere there was a sub Switch (&);

    wow, but even then i would have done Switch sub {...} just like i say my $n=scalar(@ar);, im not into golf

      i would have done Switch sub {...}

      Ok, but without the sub is also not uncommon, for example I'd say Try::Tiny's sub try (&;@) clearly looks better when written try { ... } catch { ... };.

      In regards to your other post:

      the whole (logical-test) && do { process-stmts} ; setup while legal is very "un-perlish"

      I disagree, I think it's very perlish, in fact probably "too" perlish! ;-)

      given/when

      Note that these were retroactively marked experimental as of v5.16, and will generate warnings in Perl v5.18 and above:

      It is clear that smartmatch is almost certainly either going to change or go away in the future. Relying on its current behavior is not recommended.