Hi i have a problem with module variables. Im trying to find all scalar/array/hash variables in a module, then undef them to destroy all objects, but i want to save subs and other module things (so Symbol::delete_package is not thing i want to do).
Got symbol table this way
This gives me otput like
Now how can i check type of element e.g. Fcntl::S_IFENFMT ? Seems ref() not working on them
Maybe there is other methods to return module to "just-loaded" state?
Got symbol table this way
Code:
perl -MFcntl -e 'foreach (keys(%{'main::Fcntl::'})) { print $_," - ", ${'main::Fcntl::'}{$_}, "\n"; }'
Code:
...
S_IFENFMT - *Fcntl::S_IFENFMT
O_TEXT - *Fcntl::O_TEXT
...
Maybe there is other methods to return module to "just-loaded" state?