On Tue Jun 15 08:13:06 2004, leo wrote: > Dan Sugalski <[EMAIL PROTECTED]> wrote: > > At 9:50 AM +0200 6/3/04, Leopold Toetsch wrote: > >>Dan Sugalski <[EMAIL PROTECTED]> wrote: > >> > >>> Option two here would be the right one. > >> > >>For dynamic PMC classes and NCI yes. *But* what about dynamic opcode > >>libs? The PASM/PIR compilers have to load in the lib to be able to emit > >>the opcode number. > > I've for now disabled C<loadlib> at compile time for variables. We still > need something for dynamic opcode libs. > > I think that a separate opcode would be simplest: > > load_ops Px, "myops" # constant filename only, compile time > loadlib Px, lib # runtime > > leo >
I checked this bug on windows, and apparently, the loadlib op works. See for an example the attachment. It loads the library libnci_test, which is included in the Parrot distr. Both $P0 = loadlib myLib as $P0 = loadlib 'libnci_test' work. However, something else seems to be wrong: when loading a non-existent library (as in the example), no error message/exception is shown/raised. I think this should be the case, although I don't really know the specs for that. (it would make sense to do so, though)
loadlibtest.pir
Description: Binary data