home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / !Perl / riscos / RISCOS / MemMap.pm < prev    next >
Text File  |  1998-07-12  |  951b  |  48 lines

  1. package RISCOS::MemMap;
  2.  
  3. require Exporter;
  4. use strict;
  5. use vars qw (@ISA @EXPORT $VERSION @page_status);
  6.  
  7. @ISA = qw(Exporter);
  8. @EXPORT_OK = 'page_status';
  9. $VERSION = 0.02;
  10. # Version 0.02 uses map
  11.  
  12. @page_status = (
  13.      'Read/Write',
  14.      'Read Only',
  15.      'Inaccessible',
  16.      'Mapped out'
  17. );
  18.  
  19. sub page_status {
  20.     return $page_status[$_[0]] unless wantarray;
  21.     map  { $page_status[$_] } @_;
  22. }
  23.  
  24. 1;
  25. __END__
  26.  
  27. =head1 NAME
  28.  
  29. RISCOS::MemMap -- perl module to manage memory map entries
  30.  
  31. =head1 SYNOPSIS
  32.  
  33.     use RISCOS::MemMap 'page_status';
  34.     $status_text = page_status $status;
  35.  
  36. =head1 DESCRIPTION
  37.  
  38. This module provides a perl function C<page_status> to convert numeric OS MemMap
  39. page access flags to text. If called in scalar context C<page_status> will
  40. return the text corresponding to the first argument. In array context it will
  41. return a list of text lines correspoding to the arguments,
  42.  
  43. =head1 AUTHOR
  44.  
  45. Nicholas Clark <F<nick@unfortu.net>>
  46.  
  47. =cut
  48.