访问应用程序上下文(Perl)

最后编辑了

sub main {
    startApplication("addressbook");

    @ctxs = applicationContextList();
    test::log("Application context count: " . @ctxs);
    foreach $ctx (@ctxs) {
     	test::log("Loop 1: Application context-1: " . $ctx->name);
    }

    foreach $ctx (applicationContextList()) {
     	test::log("Loop 2: Application context: " . $ctx->name);
    }
}