Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[v6] Implement setting loader
  • Loading branch information
sorear committed Nov 17, 2010
1 parent 08c9807 commit e6dbe54
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions v6/tryfile
Expand Up @@ -56,6 +56,17 @@ augment class Hash {

augment class STD {
our $ALL;
method load_lex($setting) {
if $setting eq 'NULL' {
my $id = "MY:file<NULL.pad>:line(1):pos(0)";
my $core = Stash.new('!id' => [$id], '!file' => 'NULL.pad',
'!line' => 1);
return Stash.new('CORE' => $core, 'MY:file<NULL.pad>' => $core,
'SETTING' => $core, $id => $core);
}

return Stash.new(%( from-jsync(slurp($setting ~ ".syml")) ));
}
method gettrait($traitname,$param) {
my $text;
my $M;
Expand Down

0 comments on commit e6dbe54

Please sign in to comment.