From: Sean O'Halpin Date: 2007-11-06T07:39:34+09:00 Subject: Re: Reading a class-file and calling it at runtime. On 11/5/07, ara.t.howard wrote: > another approach, suitable for > some limited situations is simply > > object = eval name, Binding::Top > > BEGIN{ > Binding::Top = binding > } > > which is less safe, of course, but works with effort for cases like > > object = eval 'File::Stat', Binding::Top > You can also use the predefined constant TOPLEVEL_BINDING, e.g. object = eval 'File::Stat', TOPLEVEL_BINDING Regards, Sean