[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] this is a test of the new footer



At 17:24 -0400 1999.09.24, Jim Correia wrote:
>Yes, but that doesn't preclude you from using __END__, does it?  (I hardly
>do perl, but understand some of the issues involved.)

Nope.  I use __END__ in most of my modules.  Note that "returning true"
does not mean that the true statement needs to be at the end; it just needs
to be the case that the last executed statement returns true.

-------module file--------
package Foo;
my $x = 1;

sub do_something {
  print $x; $x++;
}

__END__
-------module file--------

This module returns true.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org