From a99b1639d2d2c568cdd3a5785a8b9e472c03bca2 Mon Sep 17 00:00:00 2001 From: Tom Phoenix Date: Fri, 5 Sep 1997 00:00:00 +0000 Subject: Documenting the perl-thanks address private-msgid: Pine.GSO.3.96.970913064628.12359F-100000@julie.teleport.com --- pod/perl.pod | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pod') diff --git a/pod/perl.pod b/pod/perl.pod index 3036f35b21..e989ebaacf 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -242,6 +242,11 @@ See L. Larry Wall >, with the help of oodles of other folks. +If your Perl success stories and testimonials may be of help to others +who wish to advocate the use of Perl in their applications, +or if you wish to simply express your gratitude to Larry and the +Perl developers, please write to >. + =head1 FILES "/tmp/perl-e$$" temporary file for -e commands -- cgit v1.2.1 From 5db417f7cafcc6c30c8205e213a6072c4a67d513 Mon Sep 17 00:00:00 2001 From: Tim Bunce Date: Fri, 5 Sep 1997 00:00:00 +0000 Subject: minor fix for perltrap.pod (this is the same change as commit 9bf4ea843f7631689691908b2ccde8f571b18cde, but as applied) --- pod/perltrap.pod | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'pod') diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 9382789969..02abc3b03b 100644 --- a/pod/perltrap.pod +++ b/pod/perltrap.pod @@ -35,7 +35,7 @@ Curly brackets are required on Cs and Cs. =item * -Variables begin with "$" or "@" in Perl. +Variables begin with "$", "@" or "%" in Perl. =item * @@ -168,7 +168,7 @@ There's no switch statement. (But it's easy to build one on the fly.) =item * -Variables begin with "$" or "@" in Perl. +Variables begin with "$", "@" or "%" in Perl. =item * @@ -1451,9 +1451,7 @@ Everything else. =over 5 -=item * Unclassified - -C/C trap using returned value +=item * C/C trap using returned value If the file doit.pl has: @@ -1474,6 +1472,14 @@ Running doit.pl gives the following: Same behavior if you replace C with C. +=item * C on empty string with LIMIT specified + + $string = ''; + @list = split(/foo/, $string, 2) + +Perl4 returns a one element list containing the empty string but Perl5 +returns an empty list. + =back As always, if any of these are ever officially declared as bugs, -- cgit v1.2.1 From 1748e8dd6b8c191183a3274a47dc445791b196e8 Mon Sep 17 00:00:00 2001 From: "Rujith S. de Silva" Date: Fri, 5 Sep 1997 00:00:00 +0000 Subject: xsubpp: document advanced dynamic typemap usage --- pod/perlxs.pod | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'pod') diff --git a/pod/perlxs.pod b/pod/perlxs.pod index 13ad669531..6629af2dd5 100644 --- a/pod/perlxs.pod +++ b/pod/perlxs.pod @@ -1102,6 +1102,37 @@ that the C unary operator C<*> is considered to be a part of the C type name. TYPEMAP Netconfig *T_PTROBJ +Here's a more complicated example: suppose that you wanted C to be blessed into the class C. One way to do +this is to use underscores (_) to separate package names, as follows: + + typedef struct netconfig * Net_Config; + +And then provide a typemap entry C that maps underscores to +double-colons (::), and declare C to be of that type: + + + TYPEMAP + Net_Config T_PTROBJ_SPECIAL + + INPUT + T_PTROBJ_SPECIAL + if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")) { + IV tmp = SvIV((SV*)SvRV($arg)); + $var = ($type) tmp; + } + else + croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\") + + OUTPUT + T_PTROBJ_SPECIAL + sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\", + (void*)$var); + +The INPUT and OUTPUT sections substitute underscores for double-colons +on the fly, giving the desired effect. This example demonstrates some +of the power and versatility of the typemap facility. + =head1 EXAMPLES File C: Interface to some ONC+ RPC bind library functions. -- cgit v1.2.1