Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-C
perl-Carp-Object
perl-Carp-Object.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Carp-Object.spec of Package perl-Carp-Object
# # spec file for package perl-Carp-Object # # Copyright (c) 2024 SUSE LLC # # 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/ # %define cpan_name Carp-Object Name: perl-Carp-Object Version: 1.02 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Replacement for Carp or Carp::Clan, object-oriented URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DA/DAMI/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Clone) BuildRequires: perl(Devel::StackTrace) BuildRequires: perl(Module::Build) >= 0.42 BuildRequires: perl(Module::Load) Requires: perl(Clone) Requires: perl(Devel::StackTrace) Requires: perl(Module::Load) %{perl_requires} %description This is an object-oriented alternative to Carp/croak or Carp::Clan/croak, for reporting errors in modules from the perspective of the caller instead of reporting the internal implementation line where the error occurs. Carp or Carp::Clan were designed long ago, at a time when Perl had no support yet for object-oriented programming; therefore they only have a functional API that is not very well suited for extensions. The present module attemps to mimic the same behaviour, but with an object-oriented implementation that offers more tuning options, and also supports errors raised as Exception objects. Unlike Carp or Carp::Clan, where the presentation of stack frames is hard-coded, here it is delegated to Devel::StackTrace. This means that clients can also take advantage of options in Devel::StackTrace to tune the output -- or even replace it by another class. Clients can choose between the object-oriented API, presented in the next chapter, or a traditional functional API compatible with Carp or Carp::Clan, presented in the following chapter. *DISCLAIMER*: this module is very young and not battle-proofed yet. Despite many efforts to make it behave as close as possible to the original Carp, there might be some edge cases where it is not strictly equivalent. If you encounter such situations, please open an issue at https://github.com/damil/Carp-Object/issues. %prep %autosetup -n %{cpan_name}-%{version} %build perl Build.PL --installdirs=vendor ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes %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