Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pragma @LOAD is not always honored

3 views
Skip to first unread message

Stéphane Payrard

unread,
Sep 12, 2004, 8:30:27 PM9/12/04
to perl6-i...@perl.org
When routines declared with the @LOAD pragma are in the main
segment, they are not executed. This is probably not a problem
because the code of these routines could be easly moved in the
main routine but that should be either fixed or documented.

Example:

.sub foo @LOAD
print "foo executed\n"
.end

.sub main @MAIN
print "main\n"
.end

--
stef

Leopold Toetsch

unread,
Sep 13, 2004, 4:59:25 AM9/13/04
to st...@payrard.net, perl6-i...@perl.org
Stéphane Payrard wrote:
> When routines declared with the @LOAD pragma are in the main
> segment, they are not executed. This is probably not a problem
> because the code of these routines could be easly moved in the
> main routine but that should be either fixed or documented.

Yep. Updated docs.

Thanks,
leo

0 new messages