Skip to content

Commit

Permalink
implemented skeletal Buf type
Browse files Browse the repository at this point in the history
The current implementation does not do anything useful, it just
adds stubbed .encode and .decode methods to Str and Buf, respectively.
  • Loading branch information
Carl Masak committed Jul 12, 2009
1 parent 08928df commit 0bca00c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/Makefile.in
Expand Up @@ -115,6 +115,7 @@ SETTING = \
src/setting/Any-str.pm \
src/setting/Array.pm \
src/setting/Bool.pm \
src/setting/Buf.pm \
src/setting/Hash.pm \
src/setting/IO.pm \
src/setting/IO/Socket.pm \
Expand All @@ -126,6 +127,7 @@ SETTING = \
src/setting/Operators.pm \
src/setting/Pair.pm \
src/setting/Range.pm \
src/setting/Str.pm \
src/setting/Temporal.pm \
src/setting/Whatever.pm \

Expand Down
11 changes: 11 additions & 0 deletions src/setting/Buf.pm
@@ -0,0 +1,11 @@
class Buf does Positional {
method decode($encoding = 'UTF-8') {
return "";
}

method list() {
return [];
}
}

# vim: ft=perl6
5 changes: 5 additions & 0 deletions src/setting/Str.pm
@@ -0,0 +1,5 @@
class Str is also {
method encode($encoding = 'UTF-8', $nf = '') {
return Buf.new();
}
}

0 comments on commit 0bca00c

Please sign in to comment.