⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlvms.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 5 页
字号:
.IX Header "PERL_VMS_EXCEPTION_DEBUG"The \s-1PERL_VMS_EXCEPTION_DEBUG\s0 being defined as \*(L"\s-1ENABLE\s0\*(R" will cause the \s-1VMS\s0debugger to be invoked if a fatal exception that is not otherwisehandled is raised.  The purpose of this is to allow debugging ofinternal Perl problems that would cause such a condition..PPThis allows the programmer to look at the execution stack and variables tofind out the cause of the exception.  As the debugger is being invoked asthe Perl interpreter is about to do a fatal exit, continuing the executionin debug mode is usally not practical..PPStarting Perl in the \s-1VMS\s0 debugger may change the program executionprofile in a way that such problems are not reproduced..PPThe \f(CW\*(C`kill\*(C'\fR function can be used to test this functionality from withina program..PPIn typical \s-1VMS\s0 style, only the first letter of the value of this logicalname is actually checked in a case insensitive mode, and it is consideredenabled if it is the value \*(L"T\*(R",\*(L"1\*(R" or \*(L"E\*(R"..PPThis logical name must be defined before Perl is started..SH "Command line".IX Header "Command line".Sh "I/O redirection and backgrounding".IX Subsection "I/O redirection and backgrounding"Perl for \s-1VMS\s0 supports redirection of input and output on the command line, using a subset of Bourne shell syntax:.IP "\(bu" 4\&\f(CW\*(C`<file\*(C'\fR reads stdin from \f(CW\*(C`file\*(C'\fR,.IP "\(bu" 4\&\f(CW\*(C`>file\*(C'\fR writes stdout to \f(CW\*(C`file\*(C'\fR,.IP "\(bu" 4\&\f(CW\*(C`>>file\*(C'\fR appends stdout to \f(CW\*(C`file\*(C'\fR,.IP "\(bu" 4\&\f(CW\*(C`2>file\*(C'\fR writes stderr to \f(CW\*(C`file\*(C'\fR,.IP "\(bu" 4\&\f(CW\*(C`2>>file\*(C'\fR appends stderr to \f(CW\*(C`file\*(C'\fR, and.IP "\(bu" 4\&\f(CW\*(C`2>&1\*(C'\fR redirects stderr to stdout..PPIn addition, output may be piped to a subprocess, using the  character '|'.  Anything after this character on the command line is passed to a subprocess for execution; the subprocess takes the output of Perl as its input..PPFinally, if the command line ends with '&', the entire command is run in the background as an asynchronous subprocess..Sh "Command line switches".IX Subsection "Command line switches"The following command line switches behave differently under\&\s-1VMS\s0 than described in perlrun.  Note also that in orderto pass uppercase switches to Perl, you need to enclosethem in double-quotes on the command line, since the \s-1CRTL\s0downcases all unquoted strings..PPOn newer 64 bit versions of OpenVMS, a process setting nowcontrols if the quoting is needed to preserve the case ofcommand line arguments..IP "\-i" 4.IX Item "-i"If the \f(CW\*(C`\-i\*(C'\fR switch is present but no extension for a backupcopy is given, then inplace editing creates a new version ofa file; the existing copy is not deleted.  (Note that ifan extension is given, an existing file is renamed to the backupfile, as is the case under other operating systems, so it doesnot remain as a previous version under the original filename.).IP "\-S" 4.IX Item "-S"If the \f(CW"\-S"\fR or \f(CW\*(C`\-"S"\*(C'\fR switch is present \fIand\fR the scriptname does not contain a directory, then Perl translates thelogical name \s-1DCL$PATH\s0 as a searchlist, using each translationas a directory in which to look for the script.  In addition,if no file type is specified, Perl looks in each directoryfor a file matching the name specified, with a blank type,a type of \fI.pl\fR, and a type of \fI.com\fR, in that order..IP "\-u" 4.IX Item "-u"The \f(CW\*(C`\-u\*(C'\fR switch causes the \s-1VMS\s0 debugger to be invokedafter the Perl program is compiled, but before it hasrun.  It does not create a core dump file..SH "Perl functions".IX Header "Perl functions"As of the time this document was last revised, the following Perl functions were implemented in the \s-1VMS\s0 port of Perl (functions marked with * are discussed in more detail below):.PP.Vb 10\&    file tests*, abs, alarm, atan, backticks*, binmode*, bless,\&    caller, chdir, chmod, chown, chomp, chop, chr,\&    close, closedir, cos, crypt*, defined, delete, die, do, dump*, \&    each, endgrent, endpwent, eof, eval, exec*, exists, exit, exp, \&    fileno, flock  getc, getgrent*, getgrgid*, getgrnam, getlogin, getppid,\&    getpwent*, getpwnam*, getpwuid*, glob, gmtime*, goto,\&    grep, hex, ioctl, import, index, int, join, keys, kill*,\&    last, lc, lcfirst, lchown*, length, link*, local, localtime, log, lstat, m//,\&    map, mkdir, my, next, no, oct, open, opendir, ord, pack,\&    pipe, pop, pos, print, printf, push, q//, qq//, qw//,\&    qx//*, quotemeta, rand, read, readdir, readlink*, redo, ref, rename,\&    require, reset, return, reverse, rewinddir, rindex,\&    rmdir, s///, scalar, seek, seekdir, select(internal),\&    select (system call)*, setgrent, setpwent, shift, sin, sleep,\&    socketpair, sort, splice, split, sprintf, sqrt, srand, stat,\&    study, substr, symlink*, sysread, system*, syswrite, tell,\&    telldir, tie, time, times*, tr///, uc, ucfirst, umask,\&    undef, unlink*, unpack, untie, unshift, use, utime*,\&    values, vec, wait, waitpid*, wantarray, warn, write, y///.Ve.PPThe following functions were not implemented in the \s-1VMS\s0 port, and calling them produces a fatal error (usually) or undefined behavior (rarely, we hope):.PP.Vb 4\&    chroot, dbmclose, dbmopen, fork*, getpgrp, getpriority,  \&    msgctl, msgget, msgsend, msgrcv, semctl,\&    semget, semop, setpgrp, setpriority, shmctl, shmget,\&    shmread, shmwrite, syscall.Ve.PPThe following functions are available on Perls compiled with Dec C5.2 or greater and running \s-1VMS\s0 7.0 or greater:.PP.Vb 1\&    truncate.Ve.PPThe following functions are available on Perls built on \s-1VMS\s0 7.2 orgreater:.PP.Vb 1\&    fcntl (without locking).Ve.PPThe following functions may or may not be implemented, depending on what type of socket support you've built into your copy of Perl:.PP.Vb 9\&    accept, bind, connect, getpeername,\&    gethostbyname, getnetbyname, getprotobyname,\&    getservbyname, gethostbyaddr, getnetbyaddr,\&    getprotobynumber, getservbyport, gethostent,\&    getnetent, getprotoent, getservent, sethostent,\&    setnetent, setprotoent, setservent, endhostent,\&    endnetent, endprotoent, endservent, getsockname,\&    getsockopt, listen, recv, select(system call)*,\&    send, setsockopt, shutdown, socket.Ve.PPThe following function is available on Perls built on 64 bit OpenVMS v8.2with hard links enabled on an \s-1ODS\-5\s0 formatted build disk.  \s-1CRTL\s0 supportis in principle available as of OpenVMS v7.3\-1, and better configurationsupport could detect this..PP.Vb 1\&    link.Ve.PPThe following functions are available on Perls built on 64 bit OpenVMSv8.2 and later.  \s-1CRTL\s0 support is in principle available as of OpenVMSv7.3\-2, and better configuration support could detect this..PP.Vb 2\&   getgrgid, getgrnam, getpwnam, getpwuid,\&   setgrent, ttyname.Ve.PPThe following functions are available on Perls built on 64 bit OpenVMS v8.2and later..PP.Vb 1\&   statvfs, socketpair.Ve.IP "File tests" 4.IX Item "File tests"The tests \f(CW\*(C`\-b\*(C'\fR, \f(CW\*(C`\-B\*(C'\fR, \f(CW\*(C`\-c\*(C'\fR, \f(CW\*(C`\-C\*(C'\fR, \f(CW\*(C`\-d\*(C'\fR, \f(CW\*(C`\-e\*(C'\fR, \f(CW\*(C`\-f\*(C'\fR,\&\f(CW\*(C`\-o\*(C'\fR, \f(CW\*(C`\-M\*(C'\fR, \f(CW\*(C`\-s\*(C'\fR, \f(CW\*(C`\-S\*(C'\fR, \f(CW\*(C`\-t\*(C'\fR, \f(CW\*(C`\-T\*(C'\fR, and \f(CW\*(C`\-z\*(C'\fR work asadvertised.  The return values for \f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, and \f(CW\*(C`\-x\*(C'\fRtell you whether you can actually access the file; this maynot reflect the UIC-based file protections.  Since real andeffective \s-1UIC\s0 don't differ under \s-1VMS\s0, \f(CW\*(C`\-O\*(C'\fR, \f(CW\*(C`\-R\*(C'\fR, \f(CW\*(C`\-W\*(C'\fR,and \f(CW\*(C`\-X\*(C'\fR are equivalent to \f(CW\*(C`\-o\*(C'\fR, \f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, and \f(CW\*(C`\-x\*(C'\fR.Similarly, several other tests, including \f(CW\*(C`\-A\*(C'\fR, \f(CW\*(C`\-g\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR,\&\f(CW\*(C`\-l\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR, and \f(CW\*(C`\-u\*(C'\fR, aren't particularly meaningful under\&\s-1VMS\s0, and the values returned by these tests reflect whateveryour \s-1CRTL\s0 \f(CW\*(C`stat()\*(C'\fR routine does to the equivalent bits in thest_mode field.  Finally, \f(CW\*(C`\-d\*(C'\fR returns true if passed a devicespecification without an explicit directory (e.g. \f(CW\*(C`DUA1:\*(C'\fR), aswell as if passed a directory..SpThere are \s-1DECC\s0 feature logical names \s-1AND\s0 \s-1ODS\-5\s0 volume attributes thatalso control what values are returned for the date fields..SpNote: Some sites have reported problems when using the file-accesstests (\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, and \f(CW\*(C`\-x\*(C'\fR) on files accessed via \s-1DEC\s0's \s-1DFS\s0.Specifically, since \s-1DFS\s0 does not currently provide access to theextended file header of files on remote volumes, attempts toexamine the \s-1ACL\s0 fail, and the file tests will return false,with \f(CW$!\fR indicating that the file does not exist.  You canuse \f(CW\*(C`stat\*(C'\fR on these files, since that checks UIC-based protectiononly, and then manually check the appropriate bits, as defined byyour C compiler's \fIstat.h\fR, in the mode value it returns, if youneed an approximation of the file's protections..IP "backticks" 4.IX Item "backticks"Backticks create a subprocess, and pass the enclosed stringto it for execution as a \s-1DCL\s0 command.  Since the subprocess iscreated directly via \f(CW\*(C`lib$spawn()\*(C'\fR, any valid \s-1DCL\s0 command stringmay be specified..IP "binmode \s-1FILEHANDLE\s0" 4.IX Item "binmode FILEHANDLE"The \f(CW\*(C`binmode\*(C'\fR operator will attempt to insure that no translationof carriage control occurs on input from or output to this filehandle.Since this involves reopening the file and then restoring itsfile position indicator, if this function returns \s-1FALSE\s0, theunderlying filehandle may no longer point to an open file, or maypoint to a different position in the file than before \f(CW\*(C`binmode\*(C'\fRwas called..SpNote that \f(CW\*(C`binmode\*(C'\fR is generally not necessary when using normalfilehandles; it is provided so that you can control I/O to existingrecord-structured files when necessary.  You can also use the\&\f(CW\*(C`vmsfopen\*(C'\fR function in the VMS::Stdio extension to gain finercontrol of I/O to files and devices with different record structures..IP "crypt \s-1PLAINTEXT\s0, \s-1USER\s0" 4.IX Item "crypt PLAINTEXT, USER"The \f(CW\*(C`crypt\*(C'\fR operator uses the \f(CW\*(C`sys$hash_password\*(C'\fR systemservice to generate the hashed representation of \s-1PLAINTEXT\s0.If \s-1USER\s0 is a valid username, the algorithm and salt valuesare taken from that user's \s-1UAF\s0 record.  If it is not, thenthe preferred algorithm and a salt of 0 are used.  Thequadword encrypted value is returned as an 8\-character string..SpThe value returned by \f(CW\*(C`crypt\*(C'\fR may be compared againstthe encrypted password from the \s-1UAF\s0 returned by the \f(CW\*(C`getpw*\*(C'\fRfunctions, in order to authenticate users.  If you'regoing to do this, remember that the encrypted password inthe \s-1UAF\s0 was generated using uppercase username andpassword strings; you'll have to upcase the arguments to\&\f(CW\*(C`crypt\*(C'\fR to insure that you'll get the proper value:.Sp.Vb 9\&    sub validate_passwd {\&        my($user,$passwd) = @_;\&        my($pwdhash);\&        if ( !($pwdhash = (getpwnam($user))[1]) ||\&               $pwdhash ne crypt("\eU$passwd","\eU$name") ) {\&            intruder_alert($name);\&        }\&        return 1;\&    }.Ve.IP "die" 4.IX Item "die"\&\f(CW\*(C`die\*(C'\fR will force the native \s-1VMS\s0 exit status to be an \s-1SS$_ABORT\s0 codeif neither of the $! or $? status values are ones that would causethe native status to be interpreted as being what \s-1VMS\s0 classifies as\&\s-1SEVERE_ERROR\s0 severity for \s-1DCL\s0 error handling..SpWhen the future \s-1POSIX_EXIT\s0 mode is active, \f(CW\*(C`die\*(C'\fR, the native \s-1VMS\s0 exit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -