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

📄 clipboard.pm

📁 ARM上的如果你对底层感兴趣
💻 PM
字号:
package Win32::Clipboard;
#######################################################################
#
# Win32::Clipboard - Perl Module for Windows Clipboard Interaction
# ^^^^^^^^^^^^^^^^
# Version: 0.03 (23 Apr 1997)
#
#######################################################################

require Exporter;       # to export the constants to the main:: space
require DynaLoader;     # to dynuhlode the module.

@ISA = qw( Exporter DynaLoader );

#######################################################################
# This AUTOLOAD is used to 'autoload' constants from the constant()
# XS function.  If a constant is not found then control is passed
# to the AUTOLOAD in AutoLoader.
#

sub AUTOLOAD {
    my($constname);
    ($constname = $AUTOLOAD) =~ s/.*:://;
    #reset $! to zero to reset any current errors.
    $!=0;
    my $val = constant($constname, @_ ? $_[0] : 0);
    if ($! != 0) {
    
        # [dada] This results in an ugly Autoloader error

        #if ($! =~ /Invalid/) {
        #    $AutoLoader::AUTOLOAD = $AUTOLOAD;
        #    goto &AutoLoader::AUTOLOAD;
        #} else {

        # [dada] ... I prefer this one :)

            ($pack, $file, $line) = caller;
            undef $pack; # [dada] and get rid of "used only once" warning...
            die "Win32::Clipboard::$constname is not defined, used at $file line $line.";

        #}    
    }
    eval "sub $AUTOLOAD { $val }";
    goto &$AUTOLOAD;
}


#######################################################################
# STATIC OBJECT PROPERTIES
#
$VERSION = "0.03";

#######################################################################
# FUNCTIONS
#

sub new {
    my($class, $value) = @_;
    my $self = "I'm the Clipboard!";
    Win32::Clipboard::Set($value) if defined($value);
    return bless(\$self);
}

sub DESTROY {
    my($self) = @_;
    undef $self;
}

sub Version {
    return $VERSION;
}

#######################################################################
# dynamically load in the Clipboard.pll module.
#

bootstrap Win32::Clipboard;

# Preloaded methods go here.

sub main::Win32::Clipboard {
    my($value) = @_;
    my $self={};
    my $result = Win32::Clipboard::Set($value) if defined($value);
    return bless($self, "Win32::Clipboard");
}

#Currently Autoloading is not implemented in Perl for win32
# Autoload methods go after __END__, and are processed by the autosplit program.

1;
__END__

⌨️ 快捷键说明

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