Skip to content

Instantly share code, notes, and snippets.

@tydk27
Created May 28, 2016 12:19
Show Gist options
  • Save tydk27/a506d8cc46f7ec999c2cc0b1c53dc3a7 to your computer and use it in GitHub Desktop.
Save tydk27/a506d8cc46f7ec999c2cc0b1c53dc3a7 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
package class;
use 5.010;
# Constructor
sub new {
my $self = shift;
return bless {}, $self;
}
sub process {
my ($self, $val) = @_;
say $val;
}
1;
package main;
my $feed = class->new();
$val = 'hogehoge';
$feed->process($val);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment