develooper Front page | perl.perl6.compiler | Postings from August 2010

[perl #76898] Rakudo requires an implementation of require

From:
Timothy Totten
Date:
August 1, 2010 16:20
Subject:
[perl #76898] Rakudo requires an implementation of require
Message ID:
rt-3.6.HEAD-2463-1280686342-1483.76898-82-0@perl.org
# New Ticket Created by  Timothy Totten 
# Please include the string:  [perl #76898]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76898 >


Currently there is no 'require' statement in Rakudo.

It should support two formats, the first one being:

require Module::Name;

will act like 'use Module::Name', but at runtime.
This can be simulated by using:
 eval("use Module::Name");

The other format is for loading arbitrary files:

require "/path/to/file.pm";

Which can be (roughly) simulated with:
 eval(slurp("/path/to/file.pm"));

Synopsis 11 also mentions an importation syntax compatible with use.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About