These were all uncovered by the new Pod::Checker, not yet in core.
Fixing these will speed up debugging the new Checker.
=head1 SYNOPSIS
perl Porting/acknowledgements.pl v5.15.0..HEAD
-
+
=head1 DESCRIPTION
This generates the text which goes in the Acknowledgements section in
/* Beginning of modification history */
/* Written 02-01-02 by Nick Ing-Simmons (nick@ing-simmons.net) */
/* End of modification history */
-
+
/* VOS doesn't supply a truncate function, so we build one up
from the available POSIX functions. */
-
+
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
-
+
int
truncate(const char *path, off_t len)
{
# VOS does not have truncate() but we supply one in vos.c
d_truncate="define"
archobjs="vos.o"
-
+
# Help gmake find vos.c
test -h vos.c || ln -s vos/vos.c vos.c
=head1 NAME
-Porting/sync-with-cpan
+Porting/sync-with-cpan - Synchronize with CPAN distributions
=head1 SYNOPSIS
use warnings;
my $undef;
-
+
if ($undef == 3) {
} elsif ($undef == 0) {
}
use warnings;
my $undef;
-
+
my $a = $undef + 1;
my $b
= $undef
B<NOTE:> The binaries that are built will run on all Win32 versions.
They do not depend on your host system (WinXP/Win2K/Win7) or your
Cygwin configuration (binary/text mounts, cvgserver).
-The only dependencies come from hard-coded pathnames like C</usr/local>.
+The only dependencies come from hard-coded pathnames like F</usr/local>.
However, your host system and Cygwin configuration will affect Perl's
runtime behavior (see L</"TEST">).
=item *
A subtest of the F<ext/Sys/Syslog/t/syslog.t> test fails. This is due to Haiku
-not implementing C</dev/log> support yet.
+not implementing F</dev/log> support yet.
=item *
must then use C<av_store> to assign values to these new elements.
Perl equivalent: C<unshift @myarray, ( (undef) x $n );>
-
+
=cut
*/
use warnings;
use strict;
use vars qw($VERSION $AUTOLOAD);
-$VERSION = '0.93'; # remember to update version in POD!
+$VERSION = '0.94'; # remember to update version in POD!
# $DB::single=1;
my %symcache;
LoudDecl:
package LoudDecl;
-
+
sub foo: Loud {...}
causes the above handler to be invoked, and passed:
use Attribute::Handlers;
use Tie::Cycle;
-
+
sub UNIVERSAL::Cycle : ATTR(SCALAR) {
my ($package, $symbol, $referent, $attr, $data, $phase) = @_;
$data = [ $data ] unless ref $data eq 'ARRAY';
# and thereafter...
package main;
-
+
my $next : Cycle('A'..'Z'); # $next is now a tied variable
-
+
while (<>) {
print $next;
}
current package. Otherwise it is installed in the qualifier's package:
package Here;
-
+
use Attribute::Handlers autotie => {
Other::Good => Tie::SecureHash, # tie attr installed in Other::
Bad => Tie::Taxes, # tie attr installed in Here::
C<__CALLER__>, which may be specified as the qualifier of an attribute:
package Tie::Me::Kangaroo:Down::Sport;
-
+
use Attribute::Handlers autotie =>
{ '__CALLER__::Roo' => __PACKAGE__ };
# my %hsh :Good(q/bye) :Omni(q/bus/);
-
+
MyClass::Good:ATTR(HASH)( 'SomeOtherClass', # class
'LEXICAL', # no typeglob
\%hsh, # referent
'q/bye' # raw attr data
'CHECK', # compiler phase
);
-
+
MyClass::Omni:ATTR(HASH)( 'SomeOtherClass', # class
'LEXICAL', # no typeglob
\%hsh, # referent
require VMS::Filespec if $Is_VMS;
use vars qw($VERSION);
-$VERSION = '1.999002';
+$VERSION = '1.999003';
$VERSION = eval $VERSION;
sub _is_prefix {
my $installed =
ExtUtils::Installed->new(extra_libs=>["/my/lib/path"]);
-This should only be necessary if C</my/lib/path> is not in PERL5LIB.
+This should only be necessary if F</my/lib/path> is not in PERL5LIB.
Finally there is the 'default', and the related 'default_get' and 'default_set'
options. These options control the "default" object which is provided by the
use lib qw( lib );
use ExtUtils::ParseXS::Constants ();
-our $VERSION = '3.18';
+our $VERSION = '3.19';
our (@ISA, @EXPORT_OK);
@ISA = qw(Exporter);
=item * Arguments
my $typemaps_object = process_typemaps( $args{typemap}, $pwd );
-
+
List of two elements: C<typemap> element from C<%args>; current working
directory.
=item * Arguments
%targetable = make_targetable($output_expr_ref);
-
+
Single hash reference: the fourth such ref returned by C<process_typemaps()>.
=item * Return Value
use 5.006001;
use strict;
use warnings;
-our $VERSION = '3.18';
+our $VERSION = '3.19';
#use Carp qw(croak);
require ExtUtils::ParseXS;
# $typemap = ExtUtils::Typemaps->new();
# alternatively create an in-memory typemap by parsing a string
# $typemap = ExtUtils::Typemaps->new(string => $sometypemap);
-
+
# add a mapping
$typemap->add_typemap(ctype => 'NV', xstype => 'T_NV');
$typemap->add_inputmap(
);
$typemap->add_string(string => $typemapstring);
# will be parsed and merged
-
+
# remove a mapping (same for remove_typemap and remove_outputmap...)
$typemap->remove_inputmap(xstype => 'SomeType');
-
+
# save a typemap to a file
$typemap->write(file => 'anotherfile.map');
-
+
# merge the other typemap into this one
$typemap->merge(typemap => $another_typemap);
TYPEMAP
char * T_PV
-
+
INPUT
T_PV
$var = ($type)SvPV_nolen($arg)
-
+
OUTPUT
T_PV
sv_setpv((SV*)$arg, $var);
TYPEMAP
Net_Config T_PTROBJ_SPECIAL
-
+
INPUT
T_PTROBJ_SPECIAL
if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")){
}
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}\",
use vars qw{ $VERSION @EXPORT };
-$VERSION = '0.88';
+$VERSION = '0.89';
use Filter::Util::Call;
use Carp;
package MyFilter;
use Filter::Simple;
-
+
FILTER { ... };
# or just:
C<use BANG;> statement (until the next C<no BANG;> statement, if any):
package BANG;
-
+
use Filter::Util::Call ;
sub import {
package BANG;
use Filter::Simple;
-
+
FILTER {
s/BANG\s+BANG/die 'BANG' if \$BANG/g;
};
package BANG;
use Filter::Simple;
-
+
FILTER {
s/BANG\s+BANG/die 'BANG' if \$BANG/g;
}
package BANG;
use Filter::Simple;
-
+
FILTER {
s/BANG\s+BANG/die 'BANG' if \$BANG/g;
}
be made parametric:
package BANG;
-
+
use Filter::Simple;
-
+
FILTER {
my ($die_msg, $var_name) = @_;
s/BANG\s+BANG/die '$die_msg' if \${$var_name}/g;
any point on which this documentation is unclear.> This documentation
is vastly longer than the module source itself.
-=over
-
-=back
-
=head1 LANGUAGE CLASS HIERARCHIES
These are Locale::Maketext's assumptions about the class
")!\n",
}
# to be called by $lh->maketext(KEY, params...)
-
+
In other words, text outside bracket groups is turned into string
literals. Text in brackets is rather more complex, and currently follows
these rules:
# Set to a method name:
$lh->fail_with( 'failure_method' );
-
+
# Set to nothing (i.e., so failure throws a plain exception)
$lh->fail_with( undef );
-
+
# Get the current value
$handler = $lh->fail_with();
package Projname::L10N;
use base qw(Locale::Maketext);
...any methods you might want all your languages to share...
-
+
# And, assuming you want the base class to be an _AUTO lexicon,
# as is discussed a few sections up:
-
+
1;
=item *
my $class = "Math::BigInt";
use 5.006002;
-$VERSION = '1.998';
+$VERSION = '1.999';
@ISA = qw(Exporter);
@EXPORT_OK = qw(objectify bgcd blcm);
use Math::BigInt;
use Math::BigFloat;
-
+
$mbf = Math::BigFloat->new(5);
$mbi2 = Math::BigInteger->new(5);
$mbi = Math::BigInteger->new(2);
use 5.008;
use strict;
use IO::Handle;
-our $VERSION = "1.20";
+our $VERSION = "1.21";
# The following bit of eval-magic is necessary to make this work on
# perls < 5.009005.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006 by Larry Wall and others
-
+
All rights reserved.
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of either:
-
+
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
-
+
b) the "Artistic License" which comes with this Kit.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
the GNU General Public License or the Artistic License for more details.
-
+
You should have received a copy of the Artistic License with this
Kit, in the file named "Artistic". If not, I'll be glad to provide one.
-
+
You should also have received a copy of the GNU General Public License
along with this program in the file named "Copying". If not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301, USA or visit their web page on the internet at
http://www.gnu.org/copyleft/gpl.html.
-
+
For those of you that choose to use the GNU General Public License,
my interpretation of the GNU General Public License is that no Perl
script falls under the terms of the GPL unless you explicitly put
package bigint;
use 5.006;
-$VERSION = '0.31';
+$VERSION = '0.32';
use Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( PI e bpi bexp hex oct );
sub three_integer { use integer; return 3.2; }
sub three_bigint { use bigint; return 3.2; }
-
+
print three_integer(), " ", three_bigint(),"\n"; # prints "3.2 3"
=head2 Options
Some cool command line examples to impress the Python crowd ;) You might want
to compare them to the results under -Mbignum or -Mbigrat:
-
+
perl -Mbigint -le 'print sqrt(33)'
perl -Mbigint -le 'print 2*255'
perl -Mbigint -le 'print 4.5+2*255'
package bignum;
use 5.006;
-$VERSION = '0.31';
+$VERSION = '0.32';
use Exporter;
@ISA = qw( bigint );
@EXPORT_OK = qw( PI e bexp bpi hex oct );
=head1 EXAMPLES
Some cool command line examples to impress the Python crowd ;)
-
+
perl -Mbignum -le 'print sqrt(33)'
perl -Mbignum -le 'print 2*255'
perl -Mbignum -le 'print 4.5+2*255'
uses file descriptors such as those obtained by calling C<POSIX::open>.
The following will determine the maximum length of the longest allowable
-pathname on the filesystem which holds C</var/foo>.
+pathname on the filesystem which holds F</var/foo>.
$fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
$path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
package arybase;
-our $VERSION = "0.05";
+our $VERSION = "0.06";
require XSLoader;
XSLoader::load(); # This returns true, which makes require happy.
=head1 SYNOPSIS
$[ = 1;
-
+
@a = qw(Sun Mon Tue Wed Thu Fri Sat);
print $a[3], "\n"; # prints Tue
splice @array, $index, ...
each @array
keys @array
-
+
index $string, $substring # return value is affected
pos $string
substr $string, $offset, ...
use strict;
use warnings;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
package Tie::Hash ;
$db->Filtered();
package DBM_Filter::my_filter1;
-
+
sub Store { ... }
sub Fetch { ... }
no warnings 'surrogate'; # surrogates can be inputs to this
use charnames ();
-our $VERSION = '0.47';
+our $VERSION = '0.48';
require Exporter;
=over
-=item B<*> If you use this C<I> mapping
+=item Z<>B<*> If you use this C<I> mapping
the result is case-insensitive,
but dotless and dotted I's are not distinguished
-=item B<*> If you exclude this C<I> mapping
+=item Z<>B<*> If you exclude this C<I> mapping
the result is not fully case-insensitive, but
dotless and dotted I's are distinguished
package filetest;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
=head1 NAME
Because access() does not invoke stat() (at least not in a way visible
to Perl), B<the stat result cache "_" is not set>. This means that the
outcome of the following two tests is different. The first has the stat
-bits of C</etc/passwd> in C<_>, and in the second case this still
+bits of F</etc/passwd> in C<_>, and in the second case this still
contains the bits of C</etc>.
{ -d '/etc';
package overload;
-our $VERSION = '1.20';
+our $VERSION = '1.21';
%ops = (
with_assign => "+ - * / % ** << >> x .",
This module is very unusual as overloaded modules go: it does not
provide any usual overloaded operators, instead it provides an
-implementation for L<C<nomethod>>. In this example the C<nomethod>
+implementation for L</C<nomethod>>. In this example the C<nomethod>
subroutine returns an object which encapsulates operations done over
the objects: C<< symbolic->new(3) >> contains C<['n', 3]>, C<< 2 +
symbolic->new(3) >> contains C<['+', 2, ['n', 3]]>.
# Debugger for Perl 5.00x; perl5db.pl patch level:
use vars qw($VERSION $header);
-$VERSION = '1.39_07';
+$VERSION = '1.39_08';
$header = "perl5db.pl version $VERSION";
undef $console;
}
-=item * Unix - use C</dev/tty>.
+=item * Unix - use F</dev/tty>.
=cut
about locally applied patches to the source code. The created
files are F<git_version.h> and F<lib/Config_git.pl>.
-=head2 C<lib/Config_git.pl>
+=head2 F<lib/Config_git.pl>
Contains status information from git in a form meant to be processed
by the tied hash logic of Config.pm. It is actually optional,
use strict;
use XSLoader;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
XSLoader::load 'OS2::ExtAttr', $VERSION;
# Preloaded methods go here.
tie %ea, 'OS2::ExtAttr', 'my.file';
print $ea{eaname};
$ea{myfield} = 'value';
-
+
untie %ea;
=head1 DESCRIPTION
#require AutoLoader;
our @ISA = qw(Exporter);
- our $VERSION = "1.07";
+ our $VERSION = "1.08";
XSLoader::load('OS2::Process', $VERSION);
}
Use class C<OS2::localClipbrd> to ensure that clipboard is closed even if
the code in the block made a non-local exit.
-See the L</OS2::localMorphPM, OS2::localFlashWindow, and OS2::localClipbrd classes
+See the L</OS2::localMorphPM, OS2::localFlashWindow, and OS2::localClipbrd classes>
=head2 Control of the PM atom tables
package OS2::DLL;
-our $VERSION = '1.04';
+our $VERSION = '1.05';
use Carp;
use XSLoader;
=head1 DESCRIPTION
-=head2 L<Create a DLL handle>
+=head2 Create a DLL handle
$dll = OS2::DLL->module( NAME [, WHERE] );
=item Can't chdir to %s
-(F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
+(F) You called C<perl -x/foo/bar>, but F</foo/bar> is not a directory
that you can chdir to, possibly because it doesn't exist.
=item Can't check filesystem of script "%s" for nosuid
length. For example:
This code: gives this result:
-
+
unpack("W/a", "\004Gurusamy") ("Guru")
unpack("a3/A A*", "007 Bond J ") (" Bond", "J")
unpack("a3 x2 /A A*", "007: Bond, J.") ("Bond, J", ".")
# sort lexically
@articles = sort @files;
-
+
# same thing, but with explicit sort routine
@articles = sort {$a cmp $b} @files;
-
+
# now case-insensitively
@articles = sort {fc($a) cmp fc($b)} @files;
-
+
# same thing in reversed order
@articles = sort {$b cmp $a} @files;
-
+
# sort numerically ascending
@articles = sort {$a <=> $b} @files;
-
+
# sort numerically descending
@articles = sort {$b <=> $a} @files;
-
+
# this sorts the %age hash by value instead of key
# using an in-line function
@eldest = sort { $age{$b} <=> $age{$a} } keys %age;
-
+
# sort using explicit subroutine name
sub byage {
$age{$a} <=> $age{$b}; # presuming numeric
}
@sortedclass = sort byage @class;
-
+
sub backwards { $b cmp $a }
@harry = qw(dog cat x Cain Abel);
@george = qw(gone chased yz Punished Axed);
# not set here
package main;
@new = sort other::backwards @old;
-
+
# guarantee stability, regardless of algorithm
use sort 'stable';
@new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;
-
+
# force use of mergesort (not portable outside Perl 5.8)
use sort '_mergesort'; # note discouraging _
@new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
-
+
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-
+
Preamble
-
+
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
-
+
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
-
+
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
-
+
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
-
+
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
-
+
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
-
+
The precise terms and conditions for copying, distribution and
modification follow.
-
+
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
+
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
-
+
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
-
+
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
-
+
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
-
+
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
-
+
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
-
+
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
-
+
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
-
+
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
-
+
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
-
+
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
-
+
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
-
+
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
-
+
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
-
+
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
-
+
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
-
+
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
-
+
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
-
+
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
-
+
NO WARRANTY
-
+
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
-
+
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
-
+
END OF TERMS AND CONDITIONS
-
+
Appendix: How to Apply These Terms to Your New Programs
-
+
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
-
+
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
-
+
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301 USA
-
-
+
+
Also add information on how to contact you by electronic and paper mail.
-
+
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
-
+
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'show c' for details.
-
+
The hypothetical commands 'show w' and 'show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than 'show w' and 'show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
-
+
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
-
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program 'Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
-
+
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
-
+
That's all there is to it!
=cut
const char *subname = SvPVX(cv);
STRLEN name_length = SvCUR(cv); /* in bytes */
U32 is_utf8 = SvUTF8(cv);
-
+
C<SvPVX(cv)> contains just the sub name itself, not including the package.
For an AUTOLOAD routine in UNIVERSAL or one of its superclasses,
C<CvSTASH(cv)> returns NULL during a method call on a nonexistent package.
#!/usr/bin/env perl
-... and run the script as C</path/to/script.pl>. Of course, it'll need
+... and run the script as F</path/to/script.pl>. Of course, it'll need
to be executable first, so C<chmod 755 script.pl> (under Unix).
(This start line assumes you have the B<env> program. You can also put
install modules into any directory you wish. For instance, where I
say C<perl Makefile.PL>, you can substitute C<perl Makefile.PL
PREFIX=/my/perl_directory> to install the modules into
-C</my/perl_directory>. Then you can use the modules from your Perl
+F</my/perl_directory>. Then you can use the modules from your Perl
programs with C<use lib "/my/perl_directory/lib/site_perl";> or
sometimes just C<use "/my/perl_directory";>. If you're on a system
that requires superuser/root access to install modules into the
like: exists HASH->{Any}
Right operand is CODE:
-
+
Left Right Description and pseudocode
===============================================================
ARRAY CODE sub returns true on all ARRAY elements[1]
=item `STRING`
A string which is (possibly) interpolated and then executed as a
-system command with C</bin/sh> or its equivalent. Shell wildcards,
+system command with F</bin/sh> or its equivalent. Shell wildcards,
pipes, and redirections will be honored. The collected standard
output of the command is returned; standard error is unaffected. In
scalar context, it comes back as a single (potentially multi-line)
=encoding utf8
=encoding koi8-r
-
+
=encoding ShiftJIS
-
+
=encoding big5
=back
functions much like C<use integer;> You'd like this code
use MyMaths;
-
+
my $l = MyMaths->new(1.2);
my $r = MyMaths->new(3.4);
-
+
print "A: ", $l + $r, "\n";
-
+
use myint;
print "B: ", $l + $r, "\n";
-
+
{
no myint;
print "C: ", $l + $r, "\n";
}
-
+
print "D: ", $l + $r, "\n";
-
+
no myint;
print "E: ", $l + $r, "\n";
$$l + $$r;
}
};
-
+
sub new {
my ($class, $value) = @_;
bless \$value, $class;
}
-
+
1;
Note how we load the user pragma C<myint> with an empty list C<()> to
The interaction with the Perl compilation happens inside package C<myint>:
package myint;
-
+
use strict;
use warnings;
-
+
sub import {
$^H{"myint/in_effect"} = 1;
}
-
+
sub unimport {
$^H{"myint/in_effect"} = 0;
}
-
+
sub in_effect {
my $level = shift // 0;
my $hinthash = (caller($level))[10];
return $hinthash->{"myint/in_effect"};
}
-
+
1;
As pragmata are implemented as modules, like any other module, C<use myint;>
-# This file is the data file for t/porting/podcheck.t.
+# This file is the data file for porting/podcheck.t.
# There are three types of lines.
# Comment lines are white-space only or begin with a '#', like this one. Any
# changes you make to the comment lines will be lost when the file is
dist/extutils-parsexs/lib/perlxs.pod Verbatim line length including indents exceeds 79 by 1
dist/extutils-parsexs/lib/perlxstut.pod Verbatim line length including indents exceeds 79 by 10
dist/filter-simple/lib/filter/simple.pm Verbatim paragraph in NAME section 1
-dist/locale-maketext/lib/locale/maketext.pod No items in =over / =back list 1
dist/locale-maketext/lib/locale/maketext/tpj13.pod No items in =over / =back list 3
dist/math-bigint/lib/math/bigfloat.pm Apparent broken link 1
dist/math-bigint/lib/math/bigint.pm Apparent broken link 1
C:\> pl2bat foo.pl bar.PM
[..creates foo.bat, bar.PM.bat..]
-
+
C:\> pl2bat -s "/\.pl|\.pm/" foo.pl bar.PM
[..creates foo.bat, bar.bat..]
-
+
C:\> pl2bat < somefile > another.bat
-
+
C:\> pl2bat > another.bat
print scalar reverse "rekcah lrep rehtona tsuj\n";
^Z
[..another.bat is now a certified japh application..]
-
+
C:\> ren *.bat *.pl
C:\> pl2bat -u *.pl
[..updates the wrapping of some previously wrapped scripts..]
-
+
C:\> pl2bat -u -s .bat *.bat
[..same as previous example except more dangerous..]
C:\> copy runperl.bat foo.bat
C:\> foo
[..runs the perl script 'foo'..]
-
+
C:\> foo.bat
[..runs the perl script 'foo'..]
-
+
=head1 DESCRIPTION
=head1 SEE ALSO
perl The perl compiler/interpreter
-
+
s2p sed to perl translator
=head1 DIAGNOSTICS