[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-unattended/var/se3/unattended/install/linuxaux/opt/perl/lib/5.10.0/i586-linux-thread-multi/ -> Errno.pm (source)

   1  #
   2  # This file is auto-generated. ***ANY*** changes here will be lost
   3  #
   4  
   5  package Errno;
   6  our (@EXPORT_OK,%EXPORT_TAGS,@ISA,$VERSION,%errno,$AUTOLOAD);
   7  use Exporter ();
   8  use Config;
   9  use strict;
  10  
  11  "$Config{'archname'}-$Config{'osvers'}" eq
  12  "i586-linux-thread-multi-2.6.24-etchnhalf.1-686" or
  13      die "Errno architecture (i586-linux-thread-multi-2.6.24-etchnhalf.1-686) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
  14  
  15  $VERSION = "1.10";
  16  $VERSION = eval $VERSION;
  17  @ISA = qw(Exporter);
  18  
  19  @EXPORT_OK = qw(EBADR ENOMSG ENOTSUP ESTRPIPE EADDRINUSE EL3HLT EBADF
  20      ENOTBLK ENAVAIL ECHRNG ENOTNAM ELNRNG ENOKEY EXDEV EBADE EBADSLT
  21      ECONNREFUSED ENOSTR ENONET EOVERFLOW EISCONN EFBIG EKEYREVOKED
  22      ECONNRESET EWOULDBLOCK ELIBMAX EREMOTEIO ENOPKG ELIBSCN EDESTADDRREQ
  23      ENOTSOCK EIO EMEDIUMTYPE EINPROGRESS ERANGE EAFNOSUPPORT EADDRNOTAVAIL
  24      EINTR EREMOTE EILSEQ ENOMEM EPIPE ENETUNREACH ENODATA EUSERS
  25      EOPNOTSUPP EPROTO EISNAM ESPIPE EALREADY ENAMETOOLONG ENOEXEC EISDIR
  26      EBADRQC EEXIST EDOTDOT ELIBBAD EOWNERDEAD ESRCH EFAULT EXFULL
  27      EDEADLOCK EAGAIN ENOPROTOOPT ENETDOWN EPROTOTYPE EL2NSYNC ENETRESET
  28      EUCLEAN EADV EROFS ESHUTDOWN EMULTIHOP EPROTONOSUPPORT ENFILE ENOLCK
  29      ECONNABORTED ECANCELED EDEADLK ESRMNT ENOLINK ETIME ENOTDIR EINVAL
  30      ENOTTY ENOANO ELOOP ENOENT EPFNOSUPPORT EBADMSG ENOMEDIUM EL2HLT EDOM
  31      EBFONT EKEYEXPIRED EMSGSIZE ENOCSI EL3RST ENOSPC EIDRM ENOBUFS ENOSYS
  32      EHOSTDOWN EBADFD ENOSR ENOTCONN ESTALE EDQUOT EKEYREJECTED EMFILE
  33      ENOTRECOVERABLE EACCES EBUSY E2BIG EPERM ELIBEXEC ETOOMANYREFS ELIBACC
  34      ENOTUNIQ ECOMM ERESTART ESOCKTNOSUPPORT EUNATCH ETIMEDOUT ENXIO ENODEV
  35      ETXTBSY EMLINK ECHILD EHOSTUNREACH EREMCHG ENOTEMPTY);
  36      
  37  %EXPORT_TAGS = (
  38      POSIX => [qw(
  39      E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
  40      EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
  41      EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
  42      EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
  43      EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
  44      ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
  45      ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
  46      EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
  47      EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
  48      ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
  49      )]
  50  );
  51  
  52  sub EPERM () { 1 }
  53  sub ENOENT () { 2 }
  54  sub ESRCH () { 3 }
  55  sub EINTR () { 4 }
  56  sub EIO () { 5 }
  57  sub ENXIO () { 6 }
  58  sub E2BIG () { 7 }
  59  sub ENOEXEC () { 8 }
  60  sub EBADF () { 9 }
  61  sub ECHILD () { 10 }
  62  sub EWOULDBLOCK () { 11 }
  63  sub EAGAIN () { 11 }
  64  sub ENOMEM () { 12 }
  65  sub EACCES () { 13 }
  66  sub EFAULT () { 14 }
  67  sub ENOTBLK () { 15 }
  68  sub EBUSY () { 16 }
  69  sub EEXIST () { 17 }
  70  sub EXDEV () { 18 }
  71  sub ENODEV () { 19 }
  72  sub ENOTDIR () { 20 }
  73  sub EISDIR () { 21 }
  74  sub EINVAL () { 22 }
  75  sub ENFILE () { 23 }
  76  sub EMFILE () { 24 }
  77  sub ENOTTY () { 25 }
  78  sub ETXTBSY () { 26 }
  79  sub EFBIG () { 27 }
  80  sub ENOSPC () { 28 }
  81  sub ESPIPE () { 29 }
  82  sub EROFS () { 30 }
  83  sub EMLINK () { 31 }
  84  sub EPIPE () { 32 }
  85  sub EDOM () { 33 }
  86  sub ERANGE () { 34 }
  87  sub EDEADLOCK () { 35 }
  88  sub EDEADLK () { 35 }
  89  sub ENAMETOOLONG () { 36 }
  90  sub ENOLCK () { 37 }
  91  sub ENOSYS () { 38 }
  92  sub ENOTEMPTY () { 39 }
  93  sub ELOOP () { 40 }
  94  sub ENOMSG () { 42 }
  95  sub EIDRM () { 43 }
  96  sub ECHRNG () { 44 }
  97  sub EL2NSYNC () { 45 }
  98  sub EL3HLT () { 46 }
  99  sub EL3RST () { 47 }
 100  sub ELNRNG () { 48 }
 101  sub EUNATCH () { 49 }
 102  sub ENOCSI () { 50 }
 103  sub EL2HLT () { 51 }
 104  sub EBADE () { 52 }
 105  sub EBADR () { 53 }
 106  sub EXFULL () { 54 }
 107  sub ENOANO () { 55 }
 108  sub EBADRQC () { 56 }
 109  sub EBADSLT () { 57 }
 110  sub EBFONT () { 59 }
 111  sub ENOSTR () { 60 }
 112  sub ENODATA () { 61 }
 113  sub ETIME () { 62 }
 114  sub ENOSR () { 63 }
 115  sub ENONET () { 64 }
 116  sub ENOPKG () { 65 }
 117  sub EREMOTE () { 66 }
 118  sub ENOLINK () { 67 }
 119  sub EADV () { 68 }
 120  sub ESRMNT () { 69 }
 121  sub ECOMM () { 70 }
 122  sub EPROTO () { 71 }
 123  sub EMULTIHOP () { 72 }
 124  sub EDOTDOT () { 73 }
 125  sub EBADMSG () { 74 }
 126  sub EOVERFLOW () { 75 }
 127  sub ENOTUNIQ () { 76 }
 128  sub EBADFD () { 77 }
 129  sub EREMCHG () { 78 }
 130  sub ELIBACC () { 79 }
 131  sub ELIBBAD () { 80 }
 132  sub ELIBSCN () { 81 }
 133  sub ELIBMAX () { 82 }
 134  sub ELIBEXEC () { 83 }
 135  sub EILSEQ () { 84 }
 136  sub ERESTART () { 85 }
 137  sub ESTRPIPE () { 86 }
 138  sub EUSERS () { 87 }
 139  sub ENOTSOCK () { 88 }
 140  sub EDESTADDRREQ () { 89 }
 141  sub EMSGSIZE () { 90 }
 142  sub EPROTOTYPE () { 91 }
 143  sub ENOPROTOOPT () { 92 }
 144  sub EPROTONOSUPPORT () { 93 }
 145  sub ESOCKTNOSUPPORT () { 94 }
 146  sub ENOTSUP () { 95 }
 147  sub EOPNOTSUPP () { 95 }
 148  sub EPFNOSUPPORT () { 96 }
 149  sub EAFNOSUPPORT () { 97 }
 150  sub EADDRINUSE () { 98 }
 151  sub EADDRNOTAVAIL () { 99 }
 152  sub ENETDOWN () { 100 }
 153  sub ENETUNREACH () { 101 }
 154  sub ENETRESET () { 102 }
 155  sub ECONNABORTED () { 103 }
 156  sub ECONNRESET () { 104 }
 157  sub ENOBUFS () { 105 }
 158  sub EISCONN () { 106 }
 159  sub ENOTCONN () { 107 }
 160  sub ESHUTDOWN () { 108 }
 161  sub ETOOMANYREFS () { 109 }
 162  sub ETIMEDOUT () { 110 }
 163  sub ECONNREFUSED () { 111 }
 164  sub EHOSTDOWN () { 112 }
 165  sub EHOSTUNREACH () { 113 }
 166  sub EALREADY () { 114 }
 167  sub EINPROGRESS () { 115 }
 168  sub ESTALE () { 116 }
 169  sub EUCLEAN () { 117 }
 170  sub ENOTNAM () { 118 }
 171  sub ENAVAIL () { 119 }
 172  sub EISNAM () { 120 }
 173  sub EREMOTEIO () { 121 }
 174  sub EDQUOT () { 122 }
 175  sub ENOMEDIUM () { 123 }
 176  sub EMEDIUMTYPE () { 124 }
 177  sub ECANCELED () { 125 }
 178  sub ENOKEY () { 126 }
 179  sub EKEYEXPIRED () { 127 }
 180  sub EKEYREVOKED () { 128 }
 181  sub EKEYREJECTED () { 129 }
 182  sub EOWNERDEAD () { 130 }
 183  sub ENOTRECOVERABLE () { 131 }
 184  
 185  sub TIEHASH { bless [] }
 186  
 187  sub FETCH {
 188      my ($self, $errname) = @_;
 189      my $proto = prototype("Errno::$errname");
 190      my $errno = "";
 191      if (defined($proto) && $proto eq "") {
 192      no strict 'refs';
 193      $errno = &$errname;
 194          $errno = 0 unless $! == $errno;
 195      }
 196      return $errno;
 197  }
 198  
 199  sub STORE {
 200      require Carp;
 201      Carp::confess("ERRNO hash is read only!");
 202  }
 203  
 204  *CLEAR = \&STORE;
 205  *DELETE = \&STORE;
 206  
 207  sub NEXTKEY {
 208      my($k,$v);
 209      while(($k,$v) = each %Errno::) {
 210      my $proto = prototype("Errno::$k");
 211      last if (defined($proto) && $proto eq "");
 212      }
 213      $k
 214  }
 215  
 216  sub FIRSTKEY {
 217      my $s = scalar keys %Errno::;    # initialize iterator
 218      goto &NEXTKEY;
 219  }
 220  
 221  sub EXISTS {
 222      my ($self, $errname) = @_;
 223      my $r = ref $errname;
 224      my $proto = !$r || $r eq 'CODE' ? prototype($errname) : undef;
 225      defined($proto) && $proto eq "";
 226  }
 227  
 228  tie %!, __PACKAGE__;
 229  
 230  1;
 231  __END__
 232  
 233  =head1 NAME
 234  
 235  Errno - System errno constants
 236  
 237  =head1 SYNOPSIS
 238  
 239      use Errno qw(EINTR EIO :POSIX);
 240  
 241  =head1 DESCRIPTION
 242  
 243  C<Errno> defines and conditionally exports all the error constants
 244  defined in your system C<errno.h> include file. It has a single export
 245  tag, C<:POSIX>, which will export all POSIX defined error numbers.
 246  
 247  C<Errno> also makes C<%!> magic such that each element of C<%!> has a
 248  non-zero value only if C<$!> is set to that value. For example:
 249  
 250      use Errno;
 251  
 252      unless (open(FH, "/fangorn/spouse")) {
 253          if ($!{ENOENT}) {
 254              warn "Get a wife!\n";
 255          } else {
 256              warn "This path is barred: $!";
 257          } 
 258      } 
 259  
 260  If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}>
 261  returns C<"">.  You may use C<exists $!{EFOO}> to check whether the
 262  constant is available on the system.
 263  
 264  =head1 CAVEATS
 265  
 266  Importing a particular constant may not be very portable, because the
 267  import will fail on platforms that do not have that constant.  A more
 268  portable way to set C<$!> to a valid value is to use:
 269  
 270      if (exists &Errno::EFOO) {
 271          $! = &Errno::EFOO;
 272      }
 273  
 274  =head1 AUTHOR
 275  
 276  Graham Barr <gbarr@pobox.com>
 277  
 278  =head1 COPYRIGHT
 279  
 280  Copyright (c) 1997-8 Graham Barr. All rights reserved.
 281  This program is free software; you can redistribute it and/or modify it
 282  under the same terms as Perl itself.
 283  
 284  =cut
 285  


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1