#======================================================================= # import() - import symbols into user's namespace # # What we actually do is define a function in the caller's namespace # which returns the value. The function we create will normally # be inlined as a constant, thereby avoiding further sub calling # overhead. #======================================================================= sub import { #... #note: $full_name is set to "Package_I_Was_Called_From::ConstantName", for each constant you provide #if you have a scalar, it basically does *$full_name = sub () { $scalar }; #and if you have an array: *$full_name = sub () { @list }; #... }