As of r10458 Parrot doesn't load_bytecode the same file [1] twice anymore.
That is:
load_bytecode 'foo.pir'
load_bytecode 'foo.pasm' # silently ignored
load_bytecode 'foo.pbc' # silently ignored
load_bytecode 'bar/foo.pir' # ok [2]
There is also an interface to query load_bytecode-ed code:
.include 'iglobals.pasm'
interp = getinterp
hsh = interp[.IGLOBALS_PBC_LIBS'] # well PASM/PIR too
is_loaded = exists hsh['foo']
# or iterate over the hash or whatever
fullnane = hsh['foo']
HTH
leo
[1] the hash key is the given filename w/o extension. So it's not really
testing if it is the same file, but should be good enough for now.
[2] untested - more tests welcome