This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: Place in dictionary sort order
[perl5.git] / lib / perl5db / t / test-m-statement-1
CommitLineData
fedbbdd5
SF
1use strict;
2use warnings;
3
4package MyClass;
5
6sub new
7{
8 my $class = shift;
9
10 my $self = bless {}, $class;
11
12 $self->_init(@_);
13
14 return $self;
15}
16
17sub _init
18{
19 my $self = shift;
20
21 $self->{foo} = 'bar';
22
23 return;
24}
25
26sub greet
27{
28 my ($self, $msg) = @_;
29
30 print "$msg - $self->{foo}\n";
31
32 return;
33}
34
351;
36
37package main;
38
39my $obj = MyClass->new;
40
41$obj->greet("Hello");
42
431;