1020 B
1020 B
Perl API Example
Requirements
- CMake
- C++ Compiler
- Perl
- SWIG
Running from Command Line
- Run cmake with
BUILD_BINDINGS_PERL=ON - Build target
sourcetraildb - Copy two files from the
bindings_perlbuild directory intoSourcetrailDB/examples/perl_api_example/src:sourcetraildb.pm- Windows:
sourcetraildb.dll - Linux:
sourcetraildb.so - macOS:
sourcetraildb.dyliband rename tosourcetraildb.so
- Run example from the directory
SourcetrailDB/examples/perl_api_example/srcwith:
$ perl example.pl --database-file-path=absolute/path/to/SourcetrailDB/examples/perl_api_example/src/example.srctrldb --source-file-path=absolute/path/to/SourcetrailDB/examples/perl_api_example/data/file.pm
Running with Sourcetrail
- Run cmake with
BUILD_EXAMPLES=ONandBUILD_BINDINGS_PERL=ON - Build target
sourcetraildbandperl_api_example. - Open
perl_api_exampl.srctrlprjlocated in the build directory ofperl_api_examplewith Sourcetrail and index the project.