Skip to content

Commit

Permalink
[LIB,TESTS] Rename Util to Plumage::NQPUtil phase 2: update references
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffrey Broadwell committed Mar 20, 2010
1 parent d4f170a commit 1507118
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Configure.nqp
Expand Up @@ -17,7 +17,7 @@ sub MAIN () {
say("Hello, I'm Configure. My job is to poke and prod\nyour system to figure out how to build Plumage.\n");

# Load utility functions
pir::load_bytecode('src/lib/Util.pir');
pir::load_bytecode('src/lib/Plumage/NQPUtil.pir');

# Slurp in the unconfigured Makefile text
my $unconfigured := slurp(@*ARGS[0] || 'src/Makefile.in');
Expand Down
2 changes: 1 addition & 1 deletion TASKS
Expand Up @@ -84,7 +84,7 @@ project itself requires unavailable credentials or the project won't build
with missing submodules, but that can probably be put off for now.

--------
Adding more "builtins" to Util.nqp:
Adding more "builtins" to src/lib/Plumage/NQPUtil.nqp:

The guiding principles are:

Expand Down
20 changes: 10 additions & 10 deletions docs/hacking/design-internals.pod
Expand Up @@ -16,7 +16,7 @@ The Plumage stack currently looks like this:
| | ,---------------+--+--------------------. | |
| | | Plumage::Metadata | | |
+--+--+---------------------------------------+--+--+
| Util |
| Plumage::NQPUtil |
+---------------------------------------------------+
| Parrot Libraries | Parrot Languages |
| | |
Expand All @@ -28,29 +28,29 @@ The Plumage stack currently looks like this:

It is intended that as Plumage's functionality grows, more libraries (and
probably more layers) will be added in the C<Plumage::*> namespace. There
has also been some discussion of moving C<Util> or its functional equivalent
into NQP-rx as an optional utility library.
has also been some discussion of merging C<Plumage::NQPUtil> or its
functional equivalent into Kakapo, the standard library project for NQP-rx.


=head1 Component Overviews

The following sections give a mild overview of each major component, from the
C<Util> layer on up. There are some additional details for particular pieces
available in other documents; these are noted below. For even more detail,
read the source or visit C<#parrot> on C<irc.parrot.org>, and we'll be happy
to help you.
C<Plumage::NQPUtil> layer on up. There are some additional details for
particular pieces available in other documents; these are noted below. For
even more detail, read the source or visit C<#parrot> on C<irc.parrot.org>,
and we'll be happy to help you.


=head2 Util
=head2 Plumage::NQPUtil

This component provides a very simple library of common functions to all of
the layers above it. These range from functional constructs like C<grep>,
C<map>, and C<reduce>, to portable system utilities like C<find_program>,
C<mkpath>, and C<qx>, to generally useful tools like C<eval>, C<slurp>, and
C<subst>.

In addition, C<Util> provides the magic that sets up the "interpreter globals",
such as C<$*PROGRAM_NAME>, C<@*ARGS>, and C<%*VM>.
In addition, C<Plumage::NQPUtil> provides the magic that sets up the
"interpreter globals", such as C<$*PROGRAM_NAME>, C<@*ARGS>, and C<%*VM>.


=head2 Plumage::Metadata
Expand Down
4 changes: 2 additions & 2 deletions probes/cap-test.nqp
Expand Up @@ -13,8 +13,8 @@ my %*ENV;
my %*VM;

# Next, load the utility functions and fill in the "globals"
pir::load_bytecode('src/lib/Util.pir');
say("Util loaded.\n");
pir::load_bytecode('src/lib/Plumage/NQPUtil.pir');
say("Plumage::NQPUtil loaded.\n");

# Inline PIR
print("Inline PIR says: ");
Expand Down
4 changes: 2 additions & 2 deletions probes/regex-test.nqp
Expand Up @@ -6,8 +6,8 @@
# $ parrot-nqp regex-test.nqp


# Load Util module, which includes the regex helper functions
pir::load_bytecode('src/lib/Util.pir');
# Load Plumage::NQPUtil module, which includes the regex helper functions
pir::load_bytecode('src/lib/Plumage/NQPUtil.pir');

# Load data structure dumper
pir::load_bytecode('dumper.pbc');
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.in
Expand Up @@ -44,7 +44,7 @@ plumage$(EXE): src/plumage$(EXE)
$(CP) src/plumage$(EXE) plumage$(EXE)
$(CHMOD) 0755 plumage$(EXE)

src/plumage$(EXE): Makefile src/lib/Util.pbc src/lib/Plumage/Util.pbc src/lib/Plumage/Metadata.pbc src/lib/Plumage/Project.pbc src/lib/Plumage/Dependencies.pbc src/plumage.pbc
src/plumage$(EXE): Makefile src/lib/Plumage/NQPUtil.pbc src/lib/Plumage/Util.pbc src/lib/Plumage/Metadata.pbc src/lib/Plumage/Project.pbc src/lib/Plumage/Dependencies.pbc src/plumage.pbc
$(PBC_TO_EXE) src/plumage.pbc

.SUFFIXES: .nqp .pir .pbc
Expand All @@ -62,6 +62,7 @@ clean: FORCE
$(RM_F) "*~" "src/*~" "src/lib/*~" "src/lib/Plumage/*~" \
"*.pbc" "src/*.pbc" "src/lib/*.pbc" "src/lib/Plumage/*.pbc" \
src/plumage.pir src/lib/Metadata.pir \
src/lib/Util.nqp src/lib/Util.pir \
src/lib/Plumage/Metadata.pir src/lib/Plumage/Project.pir \
src/lib/Plumage/Dependencies.pir src/lib/Plumage/Util.pir \
"src/*.c" "src/*$(O)" src/plumage$(EXE) plumage$(EXE) Makefile
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Plumage/NQPUtil.nqp
Expand Up @@ -2,12 +2,12 @@

=head1 NAME
Util.nqp - Utility functions for NQP
Plumage::NQPUtil.nqp - Utility functions for NQP

=head1 SYNOPSIS
# Load this library
pir::load_bytecode('Util.pbc');
pir::load_bytecode('Plumage/NQPUtil.pbc');

# Hash methods
$found := %hash.exists($key);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Plumage/Util.nqp
Expand Up @@ -2,7 +2,7 @@

=head1 NAME
Pluamge::Util - Plumage-specific utility functions
Plumage::Util - Plumage-specific utility functions

=head1 SYNOPSIS
Expand All @@ -17,7 +17,7 @@ Pluamge::Util - Plumage-specific utility functions
These utility functions are likely only directly useful to Plumage-related
programs, unlike the more general utility functions provided by
F<src/lib/Util.nqp>.
F<src/lib/Plumage/NQPUtil.nqp>.

=over 4
Expand Down
6 changes: 3 additions & 3 deletions src/plumage.nqp
Expand Up @@ -126,9 +126,6 @@ sub load_helper_libraries () {
# Support OO
pir::load_bytecode('P6object.pbc');

# Utility functions and standard "globals"
pir::load_bytecode('Util.pbc');

# Process command line options
pir::load_bytecode('Getopt/Obj.pbc');

Expand All @@ -138,6 +135,9 @@ sub load_helper_libraries () {
# Data structure dumper for PMCs (used for debugging)
pir::load_bytecode('dumper.pbc');

# Utility functions and standard "globals"
pir::load_bytecode('Plumage/NQPUtil.pbc');

# Plumage modules: util, metadata, project, dependencies
pir::load_bytecode('Plumage/Util.pbc');
pir::load_bytecode('Plumage/Metadata.pbc');
Expand Down
2 changes: 1 addition & 1 deletion t/02-load-all.t
Expand Up @@ -28,7 +28,7 @@ sub test_load_pbcs() {
Getopt/Obj.pbc
P6object.pbc
P6Regex.pbc
Util.pbc
Plumage/NQPUtil.pbc
Plumage/Util.pbc
Plumage/Metadata.pbc
Plumage/Dependencies.pbc
Expand Down
2 changes: 1 addition & 1 deletion t/03-plumage-nqputil.t
Expand Up @@ -10,7 +10,7 @@ sub MAIN () {
pir::compreg__PS('parrot').import('Test::More');

# Load library to be tested
pir::load_bytecode('src/lib/Util.pbc');
pir::load_bytecode('src/lib/Plumage/NQPUtil.pbc');

# Run all tests for this library
run_tests();
Expand Down
4 changes: 2 additions & 2 deletions t/sanity.t
Expand Up @@ -9,8 +9,8 @@ sub MAIN () {
pir::load_language('parrot');
pir::compreg__PS('parrot').import('Test::More');

# Load Util library
pir::load_bytecode('src/lib/Util.pbc');
# Load NQP utilities library
pir::load_bytecode('src/lib/Plumage/NQPUtil.pbc');

# Set correct path for plumage binary
$PLUMAGE := fscat(['.'], 'plumage');
Expand Down

0 comments on commit 1507118

Please sign in to comment.