| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Alien::LIBSVM; | 
| 2 |  |  |  |  |  |  | # ABSTRACT: Alien package for the LIBSVM library | 
| 3 |  |  |  |  |  |  | $Alien::LIBSVM::VERSION = '0.005'; | 
| 4 | 2 |  |  | 2 |  | 163113 | use strict; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 57 |  | 
| 5 | 2 |  |  | 2 |  | 9 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 56 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 2 |  |  | 2 |  | 790 | use parent 'Alien::Base'; | 
|  | 2 |  |  |  |  | 597 |  | 
|  | 2 |  |  |  |  | 10 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | sub version { | 
| 10 | 0 |  |  | 0 | 1 | 0 | my ($class) = @_; | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 0 |  |  |  |  | 0 | ( "" . $class->SUPER::version) =~ s/^\d/$&./gr; | 
| 13 |  |  |  |  |  |  | } | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | sub inline_auto_include { | 
| 16 | 0 |  |  | 0 | 1 | 0 | return  [ "svm.h" ]; | 
| 17 |  |  |  |  |  |  | } | 
| 18 |  |  |  |  |  |  | sub libs { | 
| 19 | 1 |  |  | 1 | 1 | 16471 | my ($class) = @_; | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 1 | 50 |  |  |  | 5 | join ' ', ( | 
| 22 |  |  |  |  |  |  | $class->install_type eq 'share' ? ('-L' . File::Spec->catfile($class->dist_dir, qw(lib)) ) : (), | 
| 23 |  |  |  |  |  |  | '-lsvm', | 
| 24 |  |  |  |  |  |  | ); | 
| 25 |  |  |  |  |  |  | } | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | sub cflags { | 
| 28 | 0 |  |  | 0 | 1 | 0 | my ($class) = @_; | 
| 29 | 0 | 0 |  |  |  | 0 | join ' ', ( | 
| 30 |  |  |  |  |  |  | $class->install_type eq 'share' ? ('-I' . File::Spec->catfile($class->dist_dir, qw(include)) ) : (), | 
| 31 |  |  |  |  |  |  | ); | 
| 32 |  |  |  |  |  |  | } | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | sub Inline { | 
| 35 | 0 | 0 |  | 0 | 0 | 0 | return unless $_[-1] eq 'C'; # Inline's error message is good | 
| 36 | 0 |  |  |  |  | 0 | my $params = Alien::Base::Inline(@_); | 
| 37 |  |  |  |  |  |  | } | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | sub svm_train_path { | 
| 40 | 1 |  |  | 1 | 1 | 4374 | my ($self) = @_; | 
| 41 | 1 |  |  |  |  | 31 | File::Spec->catfile( $self->dist_dir , 'bin', 'svm-train' ); | 
| 42 |  |  |  |  |  |  | } | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | sub svm_predict_path { | 
| 45 | 1 |  |  | 1 | 1 | 14102 | my ($self) = @_; | 
| 46 | 1 |  |  |  |  | 23 | File::Spec->catfile( $self->dist_dir , 'bin', 'svm-predict' ); | 
| 47 |  |  |  |  |  |  | } | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | sub svm_scale_path { | 
| 50 | 1 |  |  | 1 | 1 | 13426 | my ($self) = @_; | 
| 51 | 1 |  |  |  |  | 25 | File::Spec->catfile( $self->dist_dir , 'bin', 'svm-scale' ); | 
| 52 |  |  |  |  |  |  | } | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | 1; | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | __END__ |