Docs, compatibility fixes again, 0.1 release

This commit is contained in:
Yorhel 2025-02-25 17:01:18 +01:00
parent 69262992ca
commit 7b0ba45346
15 changed files with 121 additions and 15 deletions

View file

@ -65,6 +65,11 @@ __END__
FU::Log - Extremely Basic Process-Wide Logging Infrastructure
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 SYNOPSIS
use FU::Log 'log_write';

View file

@ -28,6 +28,11 @@ __END__
FU::Pg - The Ultimate (synchronous) Interface to PostgreSQL
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 SYNOPSYS
use FU::Pg;
@ -40,7 +45,7 @@ FU::Pg - The Ultimate (synchronous) Interface to PostgreSQL
$conn->q('INSERT INTO books (title) VALUES ($1)', 'The Invincible')->exec;
for my ($id, $title) ($conn->q('SELECT * FROM books')->flat->@*) {
print "$id: $title\n";
print "$id: $title\n";
}
=head1 DESCRIPTION
@ -628,7 +633,65 @@ I<TODO:> Custom per-type configuration.
=head2 Errors
I<TODO>
All methods can throw an exception on error. When possible, the error message
is constructed using L<Carp>'s C<confess()>, including a full stack trace.
SQL errors and other errors from I<libpq> are reported with a C<FU::Pg::error>
object, which has the following fields:
=over
=item action
The action that was attempted, "connect", "prepare" or "exec".
=item query
The query that was being prepared or executed, if any.
=item message
Human-readable error message.
=item verbose_message
More verbose message, usually consisting of multiple lines.
=item severity
=item detail
=item hint
=item statement_position
=item internal_position
=item internal_query
=item context
=item schema_name
=item table_name
=item column_name
=item datatype_name
=item constraint_name
=item source_file
=item source_line
=item source_function
These correspond to error fields from
L<PQresultErrorField()|https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD>.
=back
=head1 LIMITATIONS

View file

@ -2,7 +2,7 @@ package FU::SQL 0.1;
use v5.36;
use Exporter 'import';
use Carp 'confess';
use experimental 'builtin';
use experimental 'builtin', 'for_list';
our @EXPORT = qw/
P RAW SQL
@ -103,6 +103,11 @@ __END__
FU::SQL - Small and Safe SQL Query Builder
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 SYNOPSIS
use FU::SQL;

View file

@ -98,6 +98,11 @@ a core Perl installation but aren't for some reason because the Perl community
doesn't believe in the concept of a "batteries included" standard library.
</rant>
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 SYNOPSIS
use FU::Util qw/json_format/;

View file

@ -1,7 +1,7 @@
package FU::Validate 0.1;
use v5.36;
use experimental 'builtin';
use experimental 'builtin', 'for_list';
use builtin qw/true false blessed/;
use Carp 'confess';
use FU::Util 'to_bool';
@ -366,6 +366,11 @@ __END__
FU::Validate - Data and form validation and normalization
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 DESCRIPTION
This module provides an easy and simple interface for data validation. It can

View file

@ -83,6 +83,11 @@ __END__
FU::XMLWriter - Convenient and efficient XML and HTML generator.
=head1 EXPERIMENTAL
This module is still in development and there will likely be a few breaking API
changes, see the main L<FU> module for details.
=head1 SYNOPSIS
use FU::XMLWriter ':html5';