1 |
root |
1.1 |
package Gtk2::CV; |
2 |
|
|
|
3 |
|
|
use XSLoader; |
4 |
|
|
|
5 |
root |
1.8 |
$VERSION = 0.14; |
6 |
root |
1.3 |
|
7 |
|
|
XSLoader::load "Gtk2::CV", $VERSION; |
8 |
root |
1.1 |
|
9 |
root |
1.2 |
use Gtk2; |
10 |
|
|
|
11 |
root |
1.4 |
sub find_rcfile { |
12 |
root |
1.2 |
my $path; |
13 |
|
|
|
14 |
|
|
for (@INC) { |
15 |
root |
1.4 |
$path = "$_/Gtk2/CV/$_[0]"; |
16 |
|
|
return $path if -r $path; |
17 |
root |
1.2 |
} |
18 |
|
|
|
19 |
root |
1.4 |
die "FATAL: can't find required file $_[0]\n"; |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
sub require_image { |
23 |
|
|
new_from_file Gtk2::Gdk::Pixbuf find_rcfile "images/$_[0]"; |
24 |
root |
1.2 |
} |
25 |
|
|
|
26 |
root |
1.1 |
1; |
27 |
|
|
|