New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: BEGIN, END docs in wrong section #9091
Comments
From denis.howe@gmail.comThis is a bug report for perl from denis.howe@gmail.com, The section "BEGIN, CHECK, INIT and END" in the Flags: Site configuration information for perl v5.8.8: Configured by Debian Project at Sat Sep 29 06:08:51 GMT 2007. Summary of my perl5 (revision 5 version 8 subversion 8) configuration: |
From @ysthOn Tue, October 30, 2007 8:01 am, denis.howe@gmail.com wrote:
But they aren't statements, they are subroutines. perlsub? A new |
The RT System itself - Status changed from 'new' to 'open' |
From @davidnicolOn 10/30/07, denis.howe@gmail.com (via RT) <perlbug-followup@perl.org> wrote:
The thing that the time shifting keywords have to do with modules is |
From @richardfoleyOn Wednesday 31 October 2007 07:53, David Nicol wrote:
Might it not be more intuitive to mention, in perlmod, that these specially -- http://www.rfi.net/ |
From @davidnicol
short entries in perlfunc.pod would also make sense |
From @jkeenanOn Tue Oct 30 08:01:32 2007, denis.howe@gmail.com wrote:
Reviewing this older ticket tonight, I note that there was some However, the facts that (a) no one ever submitted any patches for any of Do people agree with that argument? If so, we can put this ticket out Thank you very much. |
From @rjbs* James E Keenan via RT <perlbug-followup@perl.org> [2012-05-03T21:50:55]
I agree. -- |
@cpansprout - Status changed from 'open' to 'rejected' |
From @bulk88On Thu May 03 19:29:24 2012, perl.p5p@rjbs.manxome.org wrote:
I disagree. The BEGIN/END blocks are part of the language, they are not |
@cpansprout - Status changed from 'rejected' to 'open' |
From denis.howe@gmail.comOn 2007-10-30 at 08:01:32, denis.howe@gmail.com wrote:
If I create a patch, what are the chances of it being accepted? |
From @cpansproutOn Fri May 04 07:13:17 2012, denis.howe@gmail.com wrote:
I don’t know; something like 80%, maybe? :-) -- Father Chrysostomos |
From tchrist@perl.com
That's not quite true. Things like UNITCHECK and END are used as per-module END works as a classwide destructor, just as DESTROY So I disagree that those functions have nothing to And they really *don't* belong in perlsyn. There is --tom |
From @bulk88On Fri May 04 09:23:17 2012, tom christiansen wrote:
Although textbook usage of the BEGIN/END blocks is with modules, there Sorry if this reply appears twice. |
From tchrist@perl.com
Well that may be, but these are *subroutines*. They are not As I said, there is an argument that they should go in perlsub. But perlsyn makes no sense. --tom |
From denis.howe@gmail.comOn Fri 2012-05-04 07:13:17, denis.howe@gmail.com wrote:
tchrist1 via RT <perlbug-followup@perl.org> wrote:
I can't believe I'm arguing with Tom :-) but... Many Perl features are relevant to good module design but that doesn't
So why does the doc say that it is not good style to prefix them with
That is quite clearly exactly what they are - special control
Exactly.
Only if you can convince us they are subroutines.
Not unrelated, but not specific to modules. |
From @rurbanOn Sat, May 5, 2012 at 3:15 AM, Denis Howe <denis.howe@gmail.com> wrote:
Any reasonable person is expected to find it the file where it was And its referenced in multiple pods on CPAN this way. |
From @bulk88On Sun May 06 06:32:23 2012, rurban wrote:
|
From @nwc10On Sat, May 05, 2012 at 09:15:29AM +0100, Denis Howe wrote:
Not quite true. The default array for shift is on @_, not @ARGV, inside them.
You're not phrasing that correctly. They *are* subroutines. That's what they What matters is whether from a language user perspective whether they are so Nicholas Clark |
From dcmertens.perl@gmail.comOn Tue, May 8, 2012 at 5:25 AM, Nicholas Clark <nick@ccl4.org> wrote:
I can have arbitrarily many BEGIN blocks in the same package, and they are If BEGIN and other named blocks are implemented as subroutines, with sundry FWIW, I have round tuits, maybe even enough to write docs for said wart, David -- |
From @cpansproutOn Tue May 08 08:21:21 2012, dcmertens.perl@gmail.com wrote:
#!perl use 5.15.9; sub MODIFY_CODE_ATTRIBUTES { $_[1](); undef *DESTROY; () } warn "run time"; sub DESTROY :foo { warn "hello" } __END__
They might be special, but they are still subroutines. You can goto& #!perl DESTROY { warn "destroy" } __END__
I don’t consider them warts, but I wouldn’t mind better documentation, -- Father Chrysostomos |
@rjbs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#47027 (status was 'resolved')
Searchable as RT47027$
The text was updated successfully, but these errors were encountered: