home *** CD-ROM | disk | FTP | other *** search
- package Win32::Clipboard;
-
- require Exporter; # to export the constants to the main:: space
- require DynaLoader; # to dynuhlode the module.
-
- @ISA = qw( Exporter DynaLoader );
-
-
- sub AUTOLOAD {
- my($constname);
- ($constname = $AUTOLOAD) =~ s/.*:://;
- $!=0;
- my $val = constant($constname, @_ ? $_[0] : 0);
- if ($! != 0) {
-
-
-
-
- ($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;
- }
-
-
- $VERSION = "0.03";
-
-
- 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;
- }
-
-
- bootstrap Win32::Clipboard;
-
-
- sub main::Win32::Clipboard {
- my($value) = @_;
- my $self={};
- my $result = Win32::Clipboard::Set($value) if defined($value);
- return bless($self, "Win32::Clipboard");
- }
-
-
- 1;
- __END__
-
-