Skip to content

Commit

Permalink
add stubs for [package]
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Dec 1, 2009
1 parent 03b8836 commit 78524e7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/Makefile.in
Expand Up @@ -44,6 +44,7 @@ PMTCL_C_PIR = src/gen/pmtcl-compiler.pir
PMTCL_B_PIR = src/gen/pmtcl-commands-main.pir
PMTCL_B_I_PIR = src/gen/pmtcl-commands-info.pir
PMTCL_B_N_PIR = src/gen/pmtcl-commands-namespace.pir
PMTCL_B_P_PIR = src/gen/pmtcl-commands-package.pir
PMTCL_B_S_PIR = src/gen/pmtcl-commands-string.pir
TCLLEXPAD_PIR = src/gen/tcllexpad.pir
ARE_G_PIR = src/gen/are-grammar.pir
Expand All @@ -59,6 +60,7 @@ PMTCL_SOURCES = \
$(PMTCL_B_PIR) \
$(PMTCL_B_I_PIR) \
$(PMTCL_B_N_PIR) \
$(PMTCL_B_P_PIR) \
$(PMTCL_B_S_PIR) \
$(TCLLEXPAD_PIR) \
$(ARE_G_PIR) \
Expand Down Expand Up @@ -93,6 +95,8 @@ $(PMTCL_B_I_PIR): src/PmTcl/commands/info.pm
$(PARROT_NQP) --target=pir -o $(PMTCL_B_I_PIR) src/PmTcl/commands/info.pm
$(PMTCL_B_N_PIR): src/PmTcl/commands/namespace.pm
$(PARROT_NQP) --target=pir -o $(PMTCL_B_N_PIR) src/PmTcl/commands/namespace.pm
$(PMTCL_B_P_PIR): src/PmTcl/commands/package.pm
$(PARROT_NQP) --target=pir -o $(PMTCL_B_P_PIR) src/PmTcl/commands/package.pm
$(PMTCL_B_S_PIR): src/PmTcl/commands/string.pm
$(PARROT_NQP) --target=pir -o $(PMTCL_B_S_PIR) src/PmTcl/commands/string.pm
$(TCLLEXPAD_PIR): src/TclLexPad.pm
Expand Down
1 change: 1 addition & 0 deletions src/PmTcl.pir
Expand Up @@ -21,6 +21,7 @@
.include 'src/gen/pmtcl-commands-main.pir'
.include 'src/gen/pmtcl-commands-info.pir'
.include 'src/gen/pmtcl-commands-namespace.pir'
.include 'src/gen/pmtcl-commands-package.pir'
.include 'src/gen/pmtcl-commands-string.pir'
.include 'src/gen/tcllexpad.pir'
.include 'src/gen/are-grammar.pir'
Expand Down
33 changes: 33 additions & 0 deletions src/PmTcl/commands/package.pm
@@ -0,0 +1,33 @@
our sub package(*@args) {
if +@args <1 {
error('wrong # args: should be "package option ?argument ...?"');
}
my $cmd := @args.shift();

if $cmd eq 'forget' {
return '';
} elsif $cmd eq 'ifneeded' {
return '';
} elsif $cmd eq 'names' {
return '';
} elsif $cmd eq 'prefer' {
return '';
} elsif $cmd eq 'present' {
return '';
} elsif $cmd eq 'provide' {
return '';
} elsif $cmd eq 'require' {
return '';
} elsif $cmd eq 'unknown' {
return '';
} elsif $cmd eq 'vcompare' {
return '';
} elsif $cmd eq 'versions' {
return '';
} elsif $cmd eq 'vsatisfies' {
return '';
}

# invalid subcommand.
error("bad option \"$cmd\": must be forget, ifneeded, names, prefer, present, provide, require, unknown, vcompare, versions, or vsatisfies");
}

0 comments on commit 78524e7

Please sign in to comment.