Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: global var

by stevieb (Canon)
on Apr 05, 2017 at 22:01 UTC ( #1187194=note: print w/replies, xml ) Need Help??


in reply to Re^4: global var
in thread global var

"Don't we all cut and paste from the internet or our own old code or code on CD's that come with textbooks? Yes we do."

No. We don't. Especially stuff from 2003.

Things change rapidly in the tech world. You can not build something for today's world using something that came from over a decade ago, no matter what.

You can not expect something from 2003 to act and behave today like it did then. Even in 2003, the code you've posted was outdated. If you are creating something new, you'll need to get up-to-speed on today's technology. Being an auto-mechanic by trade (but out of the industry for many years), it's like showing an example of a carburetor from a vehicle, while asking for help on a brand new fuel injected, computerized ride. I'm also a licensed residential electrician by trade, and asking about the expansion of aluminum wires in a copper socket in today's world would also be akin.

Help may come, but with 14 year old code, you're pretty much going to be kicking a dead horse (imho).

To further, the code you did post was broken horribly, and wouldn't even compile back then. Even on the node I'm replying to, you still close off with a brace where a parens is required.

Replies are listed 'Best First'.
Re^6: global var
by tultalk (Monk) on Apr 05, 2017 at 23:59 UTC

    Hi again:

    It is not closing off with a brace where a paren is required. The Brace is closing the Begin The paren is closing this: our @EXPORT_OK = qw(

    BEGIN { use vars qw($VERSION @ISA @EXPORT); use DBI; # $ENV{DBI_TRACE}=1; # $ENV{PERL_DBI_DEBUG}=1; require Exporter; @ISA = qw(Exporter); # exported functions our @EXPORT_OK = qw( &OpenConnection &OpenSession &ProcessLoginRequest &ProcessLostDataRequest &LoginUser &decodeEncryptedPassName &UpdateUserData &GetUserLostData &LogoutUser &GetUserSessionCookie &CheckForAuthorizedUser &Expires $attempts $adminaccess $LoggedOn_user_id <<<<<<---------------------- &Now &CheckValidLoginChar &CheckValidEmailChar &print_md5_javascript); $VERSION = '0.0.1'; }

    I also changed $LoggedOn_user_id to a function call &GetLoggedOn_user_id to deliver the number to the other module and it still does not work.

    And yes it compiles then and now.

    Your comments and those of some others are very discouraging to one who is having fun and enjoying this resurrection. A little tolerance is in order I think.

    I realize there is much stuff here that is old and discouraged but it still works.

      I'm one of the more tolerant folk who are around, at least I'd like to think.

      If the code you post sections of can't compile in a short example, perhaps you could post all of it within <readmore></readmore> tags, so we can see all of it.

      It isn't my intention to put anyone off. If I came across that way, I am truly sorry. Given portions of an application that aren't copy/pasted properly into the site here, it is impossible to see what is wrong, especially when it is copy/pasted more than once incorrectly.

      Paste it in within the tags I specified above, and perhaps someone will have the time to figure it out.

Re^6: global var
by Anonymous Monk on Apr 05, 2017 at 23:20 UTC
    You're using perl, its very old, people still use perls from 14 years ago , so as a general argument that old code is dead code its super weak argument ... but thats completely unrelated to the less than spaghetti code tultalk is trying to polish with little understanding

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1187194]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-06-17 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (82 votes). Check out past polls.

    Notices?