Closed p5pRT closed 14 years ago
Running the sample code in the I18N::Langinfo pod\,
use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR); my ($abday_1\, $yesstr\, $nostr) = map { langinfo } qw(ABDAY_1 YESSTR NOSTR);
gets an error
Not enough arguments for I18N::Langinfo::langinfo at foo.pl line 2\, near "langinfo }" Execution of foo.pl aborted due to compilation errors.
I suspect what it says about langinfo() using $_ if no arguments is not true.
On Mon Apr 12 17:10:55 2010\, kryde wrote:
Running the sample code in the I18N::Langinfo pod\,
use I18N​::Langinfo qw\(langinfo ABDAY\_1 YESSTR NOSTR\); my \($abday\_1\, $yesstr\, $nostr\) = map \{ langinfo \} qw\(ABDAY\_1
YESSTR NOSTR);
gets an error
Not enough arguments for I18N​::Langinfo​::langinfo at foo\.pl line
2\, near "langinfo }" Execution of foo.pl aborted due to compilation errors.
I suspect what it says about langinfo() using $_ if no arguments is not true.
You are correct. It was not true. Starting with change ff7894f\, it is true and fixed. Thanks for the report!
Steve
The RT System itself - Status changed from 'new' to 'open'
@smpeters - Status changed from 'open' to 'resolved'
You can also add the prototype directly in xs. For some reason i thought this was already the case.
On Wednesday\, August 18\, 2010\, Steve Peters via RT \perlbug\-followup@​perl\.org wrote:
On Mon Apr 12 17:10:55 2010\, kryde wrote:
Running the sample code in the I18N::Langinfo pod\,
use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR); my ($abday_1\, $yesstr\, $nostr) = map { langinfo } qw(ABDAY_1 YESSTR NOSTR);
gets an error
Not enough arguments for I18N::Langinfo::langinfo at foo.pl line 2\, near "langinfo }" Execution of foo.pl aborted due to compilation errors.
I suspect what it says about langinfo() using $_ if no arguments is not true.
You are correct. It was not true. Starting with change ff7894f\, it is true and fixed. Thanks for the report!
Steve
-- "You don't mean odds and ends\, you mean des curieux et des bouts"\, corrected the manager. -- Terry Pratchett\, Hogfather
Excellent idea! I hadn't done prototypes with XS before\, but why not? Changed with d16d4b1.
Steve Peters steve@fisharerojo.org
On Thu\, Aug 19\, 2010 at 1:52 AM\, Rafael Garcia-Suarez \< rgarciasuarez@gmail.com> wrote:
You can also add the prototype directly in xs. For some reason i thought this was already the case.
On Wednesday\, August 18\, 2010\, Steve Peters via RT \perlbug\-followup@​perl\.org wrote:
On Mon Apr 12 17:10:55 2010\, kryde wrote:
Running the sample code in the I18N::Langinfo pod\,
use I18N​::Langinfo qw\(langinfo ABDAY\_1 YESSTR NOSTR\); my \($abday\_1\, $yesstr\, $nostr\) = map \{ langinfo \} qw\(ABDAY\_1
YESSTR NOSTR);
gets an error
Not enough arguments for I18N​::Langinfo​::langinfo at foo\.pl line
2\, near "langinfo }" Execution of foo.pl aborted due to compilation errors.
I suspect what it says about langinfo() using $_ if no arguments is not true.
You are correct. It was not true. Starting with change ff7894f\, it is true and fixed. Thanks for the report!
Steve
-- "You don't mean odds and ends\, you mean des curieux et des bouts"\, corrected the manager. -- Terry Pratchett\, Hogfather
"Steve Peters via RT" \perlbug\-followup@​perl\.org writes:
Excellent idea! I hadn't done prototypes with XS before\,
That won't subtly change the way calls parse will it?
I'd be inclined to change the docs to match the code\, as langinfo() doesn't really seem like the sort of operation you'd often want to apply to $_.
On Thu\, Aug 19\, 2010 at 5:07 PM\, Kevin Ryde \user42@​zip\.com\.au wrote:
"Steve Peters via RT" \perlbug\-followup@​perl\.org writes:
Excellent idea! I hadn't done prototypes with XS before\,
That won't subtly change the way calls parse will it?
I'd be inclined to change the docs to match the code\, as langinfo() doesn't really seem like the sort of operation you'd often want to apply to $_.
Considering that for the previous nine years no one has brought this up as a problem\, I'm assuming this feature hasn't been tried much at all. That said\, the documentation specifically mentions this as a feature and the change to allow it was trivial. In this case\, I think fixing the documented feature is the best route.
Steve
Kevin Ryde wrote:
"Steve Peters via RT" \perlbug\-followup@​perl\.org writes:
Excellent idea! I hadn't done prototypes with XS before\,
That won't subtly change the way calls parse will it?
It will. That's what prototypes are for.
-zefram
Quoth zefram@fysh.org (Zefram):
Kevin Ryde wrote:
"Steve Peters via RT" \perlbug\-followup@​perl\.org writes:
Excellent idea! I hadn't done prototypes with XS before\,
That won't subtly change the way calls parse will it?
It will. That's what prototypes are for.
But we're talking about changing a prototype of ($) (created implicitly by xsubpp\, since the XS function has one argument and I::L has PROTOTYPES: ENABLE) into a prototype of (_). The only case where that makes a difference is when it was called with no arguments\, which is the bug we want to fix.
Ben
"Steve Peters via RT" \perlbug\-followup@​perl\.org writes:
Considering that for the previous nine years no one has brought this up as a problem\,
Which might of course suggest everyone has been happy with the code as it stands! :-)
-- Restaurant jargon elucidated for the layman: "Special" -- something almost gone bad that has to be sold today.
Migrated from rt.perl.org#74322 (status was 'resolved')
Searchable as RT74322$