IWidgets.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« example/Canvasprintdialog.pl ↑ Summary
1 # ##############################################################################
2 # # Script : Tkx::TclTk::Bind::IWidgets.pm #
3 # # -------------------------------------------------------------------------- #
4 # # Copyright : Frei unter GNU General Public License bzw. Artistic License #
5 # # Authors : JVBSOFT - Jürgen von Brietzke 0.001 - 1.400 #
6 # # Version : 1.400 14.Feb.2016 #
7 # # -------------------------------------------------------------------------- #
8 # # Function : Bindet die TclTk 'iwidgets4.0.2' Bibliothek an Perl::Tkx #
9 # # -------------------------------------------------------------------------- #
10 # # Language : PERL 5 (V) 5.12.xx - 5.22.xx #
11 # # Coding : ISO 8859-15 / Latin-9 UNIX-Zeilenende #
12 # # Standards : Perl-Best-Practices severity 1 (brutal) #
13 # # -------------------------------------------------------------------------- #
14 # # Module : Enc::C ActivePerl-REPO-Module #
15 # # Modern::PBP::Perl #
16 # # Tkx::TclTk::Bind #
17 # ##############################################################################
18  
19 package Tkx::TclTk::Bind::IWidgets 1.400;
20  
21 # ##############################################################################
22  
23 1 ▶use Env::C;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use Modern::PBP::Perl qw{5.12};
Subroutine BEGIN: called CC=1 SCAR=0.0
25 0 ▶use Tkx::TclTk::Bind qw{ &load_library };
Subroutine BEGIN: called CC=1 SCAR=2.6
26  
27 # ##############################################################################
28  
29 sub BEGIN {
30  
31 my $temp_dir = load_library( 'iwidgets', 'iwidgets4.0.2' );
32  
33 # --- Steuervariablen belegen -----------------------------------------------
34 my $path_to_iwidgets_library
35 = File::Spec->catfile( $temp_dir, 'iwidgets4.0.2' );
36 my $path_to_itk_library = File::Spec->catfile( $temp_dir, 'itk3.4' );
37 my $path_to_itcl_library = File::Spec->catfile( $temp_dir, 'itcl3.4' );
38  
39 # --- Environment-Variablen setzen ------------------------------------------
40 Env::C::setenv( 'ITCL_LIBRARY', $path_to_itcl_library );
41 Env::C::setenv( 'ITK_LIBRARY', $path_to_itk_library );
42  
43 # --- IWidgets in Tkx binden ------------------------------------------------
44 Tkx::lappend( '::auto_path', $path_to_itk_library );
45 Tkx::lappend( '::auto_path', $path_to_itcl_library );
46 Tkx::lappend( '::auto_path', $path_to_iwidgets_library );
47 Tkx::package_require('Iwidgets');
48  
49 } # end of sub BEGIN
50  
51 # ##############################################################################
52  
53 sub END {
54  
55 Env::C::unsetenv('ITCL_LIBRARY');
56 Env::C::unsetenv('ITK_LIBRARY');
57  
58 } # end of sub END
59  
60 # ##############################################################################
61 # # E N D #
62 # ##############################################################################
63 1;
64  
65 __END__
« example/Canvasprintdialog.pl ↑ Summary