Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: global var

by tultalk (Monk)
on Apr 06, 2017 at 23:31 UTC ( #1187361=note: print w/replies, xml ) Need Help??


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

Export and calls look the same but I keep getting:

Software error:

"LoggedOn_user_id" is not exported by the manageusers module
Can't continue after import errors at update_tables-development.cgi line 30
BEGIN failed--compilation aborted at update_tables-development.cgi line 30.

Do not understand. Not this way for others. Something unique about this.

Replies are listed 'Best First'.
Re^7: global var
by poj (Abbot) on Apr 07, 2017 at 06:01 UTC

    In a former post here Re^4: global var you had this error

    "$GetLoggedOnId" is not exported by the manageusers module
    Can't continue after import errors at update_tables-development.cgi line 30
    BEGIN failed--compilation aborted at update_tables-development.cgi line 30
    

    and your @EXPORT_OK in manageusers was

    our @EXPORT_OK = qw(
      &OpenConnection
      &OpenSession
      &ProcessLoginRequest
      &ProcessLostDataRequest
      &LoginUser
      &GetLoggedOnId  <<<<-------------------
    

    I hope you understand the cause of that error now in that $GetLoggedOnId and &GetLoggedOnId are different things.

    You now have the error

    "LoggedOn_user_id" is not exported by the manageusers module

    The questions that raises is

    Have you changed $GetLoggedOnId to LoggedOn_user_id and if so have you amended both the @EXPORT_OK in manageusers and the use manageusers qw() statement in update_tables-development.cgi ?

    As the error appears on line 30 perhaps you could post those first 30 lines of that script. Check the names carefully as in another post Re^6: global var you mentioned a function call &GetLoggedOn_user_id which is different again.

    poj
Re^7: global var
by Anonymous Monk on Apr 06, 2017 at 23:48 UTC

    Why does your code ask "managerusers" module to exports a "LoggedOn_user_id" function?

      Answer his and one above.

      Manageusers is the "main" unit in the sense that everything get funneled back to that unit for accessing database tables and all the login /logout functions. I consider it the "main" unit to which manage_users.cgi interfaces between thr web pages and the guts of the program.

      The loggedonuser the ID of the user far accessing various other pieces of data such a database records "owned" by the user.

      The change from LoggedOn_user_id to GetLoggedOn... and back again was a result of trying an exported function result to pass the id vs a scalar variable. Neither worked.

      Other functions/.scalars are exported just fine. Not this one!!!

        ...Other functions/.scalars are exported just fine. Not this one!!!

        Then it shouldn't be too hard to duplicate that error in 20 lines, and post it here, right?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-06-15 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (73 votes). Check out past polls.

    Notices?