Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-T
perl-Tuxedo
perl-Tuxedo.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Tuxedo.spec of Package perl-Tuxedo
# # spec file for package perl-Tuxedo # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: perl-Tuxedo Version: 2.08 Release: 0 %define cpan_name Tuxedo Summary: Perl extension module for Tuxedo License: CHECK(Artistic-1.0 OR GPL-1.0-or-later) Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/A/AF/AFRYER/%{cpan_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} %description This module provides the following functionality... * * *'C' style interface* The Tuxedo perl module gives you access to almost all of the tuxedo 8.1 apis from perl. In most cases you can take the C API you already familiar with, apply perl semantics to it, and write working tuxedo programs in perl. * * *Object wrapping of C structures* Many tuxedo functions take pointers to C structures as function parameters. To preserve the C interface, this module provides perl objects that encapsulate the C structures used by tuxedo. These objects allow the user to create and manipulate the elements of these C structures, and these objects are then passed as parameters to the perl version of these tuxedo C functions. * * *buffer management* Perl classes exist for each buffer type to allow for easy manipulation of buffer contents and automatic memory cleanup when no more references to the buffer exist. * * *callback subs* perl subs can be registered as unsolicited message handlers and signal handlers. * * *FML/FML32 field table support* This module includes the mkfldpm32.pl script that is the perl equivalent of the tuxedo mkfldhdr32 program. It accepts a field table file as input and produces a *.pm file that can be included in a perl script, so field identifiers can be referenced by id. * * *perl tuxedo services* You can now write tuxedo services in perl. When you build the Tuxedo module, it should create a tuxedo server called PERLSVR. This is a tuxedo server that contains an embedded perl interpretor for executing perl tuxedo services. When PERLSVR boots up, it parses the perlsvr.pl script, which at the moment it expects to find in its working directory. The location of perlsvr.pl will be configurable in a future version. The perlsvr.pl script is run as the tpsvrinit routine. You can modify perlsvr.pl to define any subs you want to be tuxedo services and advertise these subs. There are a few rules for writing subs that are to be run as tuxedo services. 1) They must accept a single input parameter which is a reference to a TPSVCINFO_PTR object. 2) They must return 5 parameters corresponding to the parameters of the tpreturn tuxedo function. You don't call tpreturn directly from a perl sub tuxedo service. When the sub returns, the PERLSVR will extract the return values from the perl stack and call tpreturn for you. Below is the perlsvr.pl that is included with this distribution. It demonstrates how to write and advertise two simple perl subs that act as tuxedo services. use Tuxedo; sub TOUPPER { my ($tpsvcinfo) = @_; my ($inbuf) = $tpsvcinfo->data; $inbuf->value( ($newval = uc($inbuf->value)) ); return ( TPSUCCESS, 0, $inbuf, $tpsvcinfo->len, 0 ); } sub REVERSE { my ($tpsvcinfo) = @_; my ($buf) = $tpsvcinfo->data; $buf->value( ($newval = reverse($buf->value)) ); return ( TPSUCCESS, 0, $buf, $tpsvcinfo->len, 0 ); } tpadvertise( "TOUPPER", \&TOUPPER ); tpadvertise( "REVERSE", \&REVERSE ); *Future versions of this module will include* * * *workstation and native modules* Different modules will exist for native and workstation tuxedo development. Currently native is the default. * * *An object oriented tuxedo interface* Version 1 of the Tuxedo module only presented an object oriented interface to the user. This version of the Tuxedo module presents the original C interface to make perl tuxedo development easier for experienced tuxedo programmers. The object oriented interface will co-exist with the C interface in a future version of this module. %prep %setup -q -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README testflds ubbconfig.template %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor