| parrotcode System Interaction Operations | |
| Docs | FAQ | Download | Examples | Talks | Resources | Perl 6 | Languages | Who's Who | Donors | Cage Cleaners | Wiki | |
sys.ops - System Interaction Ops
Operations that allow the user to interact with the system.
Spawn a subprocess whose program name and arguments are contained in the string $2 and wait for it to finish. The return status, which is very system-dependent, goes in $1.
Spawn a subprocess whose program name and arguments are contained in the array $2 and wait for it to finish. The return status, which is very system-dependent, goes in $1.
RT#36619: spawnw should return something less system-dependent, and more object-like. see RT ticket [perl #36619] for more info.
Store the system error code in $1.
Store the system error message in $1.
Get the system error message for the system error code $2 and store it in $1.
Puts the current system time (represented as a whole number of seconds) in $1.
Puts the current system time (represented as a number of seconds, with microseconds) in $1.
Take the integer, which represents GMT epoch-seconds, and turn it into a formatted string.
Take the integer, which represents GMT epoch-seconds, and turn it into a formatted string. The time is adjusted to localtime before formatting.
Take the integer, which represents GMT epoch-seconds, and return an Array PMC which represents the decoded time. The array elements are (include "tm.pasm" for the constants):
Seconds (0-60)
Minutes (0-59)
Hours (0-23)
Day of month (1-31)
Month of year (1-12) (Note, actual month, not month - 1)
Year (note, actual year. The year 2004 comes back as 2004, not 104)
Day of week. Sunday is day 0
Day of year (0-365)
Daylight savings/summer time in effect
Timezone name will be GMT and offset will be 0, since the time is taken and decoded as GMT.
Take the passed in integer, which represents GMT epoch-seconds, and return an array as in decodetime. The time is first shifted to localtime before decoding.
Return system information. The values it returns depends on what you ask. They are:
This is something like "OS X", "MacOS", "Windows", or "VMS".
This is the current (hopefully) OS Version. For OSes that have plain version numbers it will be the version number. For OSes that name their versions, it will be the version name.
On HP/UX, this may be something like 11.2, while on Windows it may be "95", "98", "2000", "NT", "ME", or "XP".
On OSes that don't name themselves, this will be the same as what's returned in the OS version string. On OSes that do name themselves, this will be a more specific version number. In all cases it is OS dependent.
The name of the CPU family, such as "VAX", "Alpha", "PPC", or "x86".
The model name of the current system's CPU. This is something like "EV68", "Athlon", or "Pentium III".
Note that some of these values may be set at Parrot compile time, rather than at runtime, if the system has no reliable way to fetch the data dynamically, or if there is no way the value can change. Also, the value returned may be somewhat misleading--Parrot running under a VirtualPC window will report "Windows" as its OS and "x86" as its CPU, even if it's really running on an OS X system.
Sleep for $1 seconds.
Get the size of native datatype $2 in $1.
Copyright (C) 2001-2008, The Perl Foundation.
This program is free software. It is subject to the same license as the Parrot interp itself.
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|