본문 바로가기

Code/Study

[Perl] Cocoa (pl pm sample)

Perl_Cocoa.zip

Cocoa.pl

package MixPerl::Cocoa;

=for interface
    [interface: pure]
    public static Cocoa Cocoa();
    public static string Drink();
=cut
    
require Cocoa;


Cocoa.pm

package Cocoa;

use strict;


sub new {

  my $class = shift;

  my $self = bless {}, $class;

  return $self;

}


sub Drink {

  my $line = "Drink Cocoa";

  return $line;

}


1;


testCocoa.pl

#!/usr/bin/perl -w

use strict;


push (@INC, 'pwd');

use Cocoa;


my $cup = new Cocoa;

print $cup->Drink;


'Code > Study' 카테고리의 다른 글

[AutoHotkey] SetTimer & PostMessage  (0) 2010.04.18
[PerlNET] Regex (Perl C# Mix)  (0) 2008.11.09
[PerlNET] CIty (Mix Perl & C#)  (0) 2008.11.09
[Perl] BeeConverter (Convert HTML Entity to Unicode Character)  (0) 2008.11.09
[C/C++ vs C#] static (1)  (0) 2008.07.16