1 2 3 4 5 6 7 8 9 10
my $full_pm_path=''; for my $base_path (@INC) { if(-f "$base_path/$pm_path") { $full_pm_path="$base_path/$pm_path"; last; } } return 0 unless($full_pm_path);
1 2 3 4
open(my $pm_fh,'<',$full_pm_path) or return 0; local $/=undef; my $code=<$pm_fh>; return eval($code);
1
2
3
4
use lib '/home2/Pfad/Desktop/Text-Editor-Vip-0.08.1';
use ::lib::Text::Editor::Vip::Buffer;
$buffer->GetClipboardContents(4);
print "$buffer \n";
2011-12-06T07:37:58 guertelschnalle2In lib/Text/Editor/Vip findet man zwar eine Buffer.pl allerdings wenn ich probiere diese über
use ::lib::Text::Editor::Vip::Buffer;
probiere sie einzubinden, sagt er mir wieder
/lib/Text/Editor/Vip/Buffer.pm in @INC
1 2
use Text::Editor::Vip::Buffer ; my $buffer = new Text::Editor::Vip::Buffer() ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl use strict; use warnings; # suche den absoluten Pfad zum Script use FindBin qw($Bin); # Ergänze den absoluten Pfad in "@INC" use lib "$Bin/lib"; # lade das Modul use Clipboard; # nutze das Modul Clipboard->copy('foo'); print Clipboard->paste('foo');