Use current best practice for importing symbols in the example.
---
 runtime/parrot/library/Test/More.pir |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/runtime/parrot/library/Test/More.pir 
b/runtime/parrot/library/Test/More.pir
index 8441b25..51660ea 100644
--- a/runtime/parrot/library/Test/More.pir
+++ b/runtime/parrot/library/Test/More.pir
@@ -4,23 +4,20 @@ Test::More - Parrot extension for testing modules
 
 =head1 SYNOPSIS
 
+ .include "hllmacros.pir"
+
+ .sub main :main
     # load this library
     load_bytecode 'library/Test/More.pir'
 
-    # get the testing functions
-    .local pmc plan
-    .local pmc diag
-    .local pmc ok
-    .local pmc is
-    .local pmc is_deeply
-    .local pmc like
-
-    plan      = find_global 'Test::More', 'plan'
-    diag      = find_global 'Test::More', 'diag'
-    ok        = find_global 'Test::More', 'ok'
-    is        = find_global 'Test::More', 'is'
-    is_deeply = find_global 'Test::More', 'is_deeply'
-    like      = find_global 'Test::More', 'like'
+    # from hllmacros.pir
+    .local pmc _
+    .IMPORT( 'Test::More', 'plan', _ )
+    .IMPORT( 'Test::More', 'diag', _ )
+    .IMPORT( 'Test::More', 'ok', _ )
+    .IMPORT( 'Test::More', 'is', _ )
+    .IMPORT( 'Test::More', 'is_deeply', _ )
+    .IMPORT( 'Test::More', 'like', _ )
 
     # set a test plan
     plan( 12 )
@@ -44,6 +41,7 @@ Test::More - Parrot extension for testing modules
     is_deeply( some_deep_pmc, another_deep_pmc, 'deep structure comparison' )
 
     like( 'foo', 'f o**{2}', 'passing regex compare with diagnostic' )
+ .end
 
 =head1 DESCRIPTION
 
-- 
1.5.0.759.g41ffe

Reply via email to