summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Bunce <Tim.Bunce@ig.co.uk>1997-01-03 17:48:46 +0000
committerChip Salzenberg <chip@atlantic.net>1997-01-04 17:44:00 +1200
commit7cfe7857715f78206e6d7d6f7fd52983de4dec44 (patch)
tree55d33b94087c668409ba6cf60795a0640994b358
parent40da2db335c65d50d3bca886fcc7161ed72faf74 (diff)
downloadperl-7cfe7857715f78206e6d7d6f7fd52983de4dec44.tar.gz
Re: perldelta, take 3
> From: Tom Christiansen <tchrist@mox.perl.com> Some quick thoughts: > =head1 NAME > > perldelta - what's new for perl5.004 (version 0.3) To avoid any confusion: s/version/perldelta version/ > =head2 Internal Change: Safe Module Absorbed into Opcode > > A new Opcode module subsumes 5.003's Safe module. The Safe > interface is still available, so existing scripts should still > work, but users are encouraged to read the new Opcode documentation. > (Note too, that after 5.004 is installed, you will no longer be > able to run Safe under the 5.003 binary.) Opcode does not supercede Safe. Safe is now implemented on top of Opcode. Opcode is purely functional. Safe implements OO 'compartments'. I'd suggest you say something like: =head2 New Opcode Module and Revised Safe Module A new Opcode module supports the creation, manipulation and application of opcode masks. The revised Safe module has a new API and is implemented using the new Opcode module. Users are encouraged to read the new Opcode and Safe documentation. (Note too, that after 5.004 is installed, you will no longer be able to run Safe under the 5.003 binary.) > =item use Module VERSION LIST > > If the VERSION argument is present between Module and LIST, then the > C<use> will fail if the $VERSION variable in package Module is > less than VERSION. > > Note that there is not a comma after the version! + This is similar to the existing version checking mechanism in the + Exporter module but it's faster and can be used with modules that + don't use the Exporter. It is the recommended method for new code. > =head2 New Built-in Methods > > The C<UNIVERSAL> package automatically contains the following methods that > are inherited by all other classes: > > =item isa ( CLASS ) > =item can ( METHOD ) > =item VERSION ( [ VERSION ] ) > > use A 1.2 qw(some imported subs); > > A->VERSION( 1.2 ); > $ref->is_instance(); # True I don't see is_instance described anywhere. I think it needs a few words. > =head1 Pragmata > > Three new pragmatic modules exist: > > =item use ops > > Restrict unsafe operations when compiling ! Disable named/unsafe opcodes when compiling perl code > =head1 Efficiency Enhancements > > All hash keys with the same string are only allocated once, so > even if you have 100 copies of the same hash, the immutable keys > never have to be re-allocated. > > Functions that do nothing but return a fixed value are now inlined. ! Functions with an empty prototype that do nothing but return a ! fixed value are now inlined. E.g., sub PI () { 3.14159 } p5p-msgid: <9701031748.AA15335@toad.ig.co.uk>
-rw-r--r--pod/perlnews.pod23
1 files changed, 15 insertions, 8 deletions
diff --git a/pod/perlnews.pod b/pod/perlnews.pod
index 0af4e4ea8e..6c12d292fe 100644
--- a/pod/perlnews.pod
+++ b/pod/perlnews.pod
@@ -25,6 +25,13 @@ binary compatibility with Perl 5.003. If you choose binary
compatibility, you do not have to recompile your extensions, but you
might have symbol conflicts if you embed Perl in another application.
+=head2 New Opcode Module and Revised Safe Module
+
+A new Opcode module supports the creation, manipulation and
+application of opcode masks. The revised Safe module has a new API
+and is implemented using the new Opcode module. Please read the new
+Opcode and Safe documentation.
+
=head2 Internal Change: FileHandle Deprecated
Filehandles are now stored internally as type IO::Handle.
@@ -33,12 +40,6 @@ are still supported for backwards compatibility
C<use IO::Handle> (or C<IO::Seekable> or C<IO::File>) and
C<*STDOUT{IO}> are the way of the future.
-=head2 Internal Change: Safe Module Absorbed into Opcode
-
-A new Opcode module subsumes 5.003's Safe module. The Safe
-interface is still available, so existing scripts should still
-work, but users are encouraged to read the new Opcode documentation.
-
=head2 Internal Change: PerlIO internal IO abstraction interface.
It is now possible to build Perl with AT&T's sfio IO package
@@ -168,6 +169,11 @@ the Universal class, croaks if the given version is larger than the
value of the variable $Module::VERSION. (Note that there is not a
comma after VERSION!)
+This version-checking mechanism is similar to the one currently used
+in the Exporter module, but it is faster and can be used with modules
+that don't use the Exporter. It is the recommended method for new
+code.
+
=item prototype(FUNCTION)
Returns the prototype of a function as a string (or C<undef> if the
@@ -321,7 +327,7 @@ See L<perllocale> for more information.
=item use ops
-Restricts unsafe operations when compiling.
+Disable unsafe opcodes, or any named opcodes, when compiling Perl code.
=back
@@ -419,7 +425,8 @@ All hash keys with the same string are only allocated once, so
even if you have 100 copies of the same hash, the immutable keys
never have to be re-allocated.
-Functions that do nothing but return a fixed value are now inlined.
+Functions that have an empty prototype and that do nothing but return
+a fixed value are now inlined (e.g. C<sub PI () { 3.14159 }>).
=head1 Documentation Changes