PERFORCE change 12967 for review
[email protected] (Chris Nandor) Tue, 13 Nov 2001 09:31:45 -0500
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05100302b816df4440f9@[10.0.1.177]> |
Change 12967 by pudge@pudge-mobile on 2001/11/13 05:44:13
Docs for Mac::err.
Affected files ...
.... //depot/maint-5.6/macperl/macos/ext/Mac/err/err.pm#2 edit
Differences ...
==== //depot/maint-5.6/macperl/macos/ext/Mac/err/err.pm#2 (text) ====
Index: perl/macos/ext/Mac/err/err.pm
--- perl/macos/ext/Mac/err/err.pm.~1~ Mon Nov 12 23:00:05 2001
+++ perl/macos/ext/Mac/err/err.pm Mon Nov 12 23:00:05 2001
@@ -6,9 +6,6 @@
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
$VERSION = '0.01';
sub import {
@@ -22,39 +19,44 @@
}
}
+*format = *import{CODE};
+
bootstrap Mac::err $VERSION;
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
+1;
-1;
__END__
-# Below is the stub of documentation for your module. You better edit it!
=head1 NAME
-Mac::err - Perl extension for blah blah blah
+Mac::err - Extension for formatting error messages
=head1 SYNOPSIS
- use Mac::err;
- blah blah blah
+ use Mac::err 'perl';
+ warn "foo";
+ Mac::err->format('MPW');
+ warn "bar";
+
+Results:
-=head1 DESCRIPTION
+ foo at Dev:Pseudo line 2.
+ # bar.
+ File 'Dev:Pseudo'; Line 4
-Stub documentation for Mac::err was created by h2xs. It looks like the
-author of the extension was negligent enough to leave the stub
-unedited.
-Blah blah blah.
+=head1 DESCRIPTION
-=head1 AUTHOR
+By default, MacPerl produces error messages that are formatted for
+use with MPW. This module allows switching the formatting behavior.
-A. U. Thor, [email protected]
+Normal usage is simply C<use Mac::err 'type'>, where the format type
+string is C<MPW> or C<perl>. If the format type is C<perl>, then the
+formatting will be the same as under Unix perl.
-=head1 SEE ALSO
+Formatting may be changed on the fly as well, with the C<format> method.
-perl(1).
+The error messages are formatted on output; so when looking at the error
+message in a variable (such as in $@) it will remain unformatted.
=cut
End of Patch.