in reply to where do you put your subs
#!/usr/bin/perl -w use Module::Foo; use Module::Bar; use Module::Baz qw(foo bar); use strict; sub first { # ... } sub second { # ... } # main code, if applicable
package Module::Xyzzy use Module::Foo; use Module::Bar; use Module::Baz qw(foo bar); use base 'Exporter'; use Carp use strict; our @EXPORT_OK = qw(...); sub CONSTANT () { 1 } sub new { # I try to always put new before other methods } sub first { # ... } sub second { # ... } sub DESTROY { # If there's a DESTROY method, I put it at the end } # main code - that is: "1;" :) __END__ =pod That's right, I use __END__ and =cut, just to be sure. My documentatio +n is NOT mixed with the code. Whenever code is unclear, I comment it, but I dislike, +no I hate pod and code mixed. =cut
++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
- Whreq
|
---|