LoginSignup
2
0

More than 5 years have passed since last update.

Tora でクラスを定義する

Last updated at Posted at 2012-12-26
class Foo {
  sub new() {
    self.bless({})
  }
  sub bar() {
     say("Hello!");
  }
}

このようにして Foo.tra を定義したら

use Foo *;

my $foo = Foo.new();
$foo.bar();

のようにして利用します。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0