I learn a thing and I don't trust my feelings about it. The shock of the new can work both ways: both attracting and repelling. There's a ton of great ideas that people didn't connect to for stupid reasons, and there's another ton of stupid ideas we've bought into because they're new and modern.
I write Perl modules for work, and I use Exporter. Our @EXPORT= qw{ names of functions } is my tendency. I like it because it's very clear what I'm exporting.
A coworker has started using
_my $functs_pod =<<'=cut';
=item B<names> - description
=item B<of> - description
=item B<functions> - description
=cut
our @EXPORT= $functs_pod =~ m/item\s+.\<(.*?)>/g;_
The benefit is that it nearly forces you to write POD to make it work, but it makes the vgrep to find the module names a more difficult thing. I don't like it. I don't like it at all. I like it more than EMACS, but less than Python, to put it in my discomfort scale. But, as I said above, I don't trust that feeling.
So, I went to my perlbrew lib directory and ran grep -sh '@EXPORT' `find . | grep \.pm` | sort | uniq | less. Nobody else is using that style either.
So, what do other #Perl mongers think? Is it a valid and neat thing we should start using, and I should just get over myself? Is it more a problem than it's worth? Are others hitting that point of being unsure, too?
No comments:
Post a Comment