/
perlapi.pod
7193 lines (4674 loc) · 160 KB
/
perlapi.pod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-*- buffer-read-only: t -*-
!!!!!!! DO NOT EDIT THIS FILE !!!!!!!
This file is built by autodoc.pl extracting documentation from the C source
files.
=head1 NAME
perlapi - autogenerated documentation for the perl public API
=head1 DESCRIPTION
X<Perl API> X<API> X<api>
This file contains the documentation of the perl public API generated by
embed.pl, specifically a listing of functions, macros, flags, and variables
that may be used by extension writers. The interfaces of any functions that
are not listed here are subject to change without notice. For this reason,
blindly using functions listed in proto.h is to be avoided when writing
extensions.
Note that all Perl API global variables must be referenced with the C<PL_>
prefix. Some macros are provided for compatibility with the older,
unadorned names, but this support may be disabled in a future release.
The listing is alphabetical, case insensitive.
=head1 "Gimme" Values
=over 8
=item GIMME
X<GIMME>
A backward-compatible version of C<GIMME_V> which can only return
C<G_SCALAR> or C<G_ARRAY>; in a void context, it returns C<G_SCALAR>.
Deprecated. Use C<GIMME_V> instead.
U32 GIMME
=for hackers
Found in file op.h
=item GIMME_V
X<GIMME_V>
The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>,
C<G_SCALAR> or C<G_ARRAY> for void, scalar or list context,
respectively.
U32 GIMME_V
=for hackers
Found in file op.h
=item G_ARRAY
X<G_ARRAY>
Used to indicate list context. See C<GIMME_V>, C<GIMME> and
L<perlcall>.
=for hackers
Found in file cop.h
=item G_DISCARD
X<G_DISCARD>
Indicates that arguments returned from a callback should be discarded. See
L<perlcall>.
=for hackers
Found in file cop.h
=item G_EVAL
X<G_EVAL>
Used to force a Perl C<eval> wrapper around a callback. See
L<perlcall>.
=for hackers
Found in file cop.h
=item G_NOARGS
X<G_NOARGS>
Indicates that no arguments are being sent to a callback. See
L<perlcall>.
=for hackers
Found in file cop.h
=item G_SCALAR
X<G_SCALAR>
Used to indicate scalar context. See C<GIMME_V>, C<GIMME>, and
L<perlcall>.
=for hackers
Found in file cop.h
=item G_VOID
X<G_VOID>
Used to indicate void context. See C<GIMME_V> and L<perlcall>.
=for hackers
Found in file cop.h
=back
=head1 Array Manipulation Functions
=over 8
=item AvFILL
X<AvFILL>
Same as C<av_len()>. Deprecated, use C<av_len()> instead.
int AvFILL(AV* av)
=for hackers
Found in file av.h
=item av_clear
X<av_clear>
Clears an array, making it empty. Does not free the memory used by the
array itself.
void av_clear(AV* ar)
=for hackers
Found in file av.c
=item av_create_and_push
X<av_create_and_push>
Push an SV onto the end of the array, creating the array if necessary.
A small internal helper function to remove a commonly duplicated idiom.
NOTE: this function is experimental and may change or be
removed without notice.
void av_create_and_push(AV **const avp, SV *const val)
=for hackers
Found in file av.c
=item av_create_and_unshift_one
X<av_create_and_unshift_one>
Unshifts an SV onto the beginning of the array, creating the array if
necessary.
A small internal helper function to remove a commonly duplicated idiom.
NOTE: this function is experimental and may change or be
removed without notice.
SV** av_create_and_unshift_one(AV **const avp, SV *const val)
=for hackers
Found in file av.c
=item av_delete
X<av_delete>
Deletes the element indexed by C<key> from the array. Returns the
deleted element. If C<flags> equals C<G_DISCARD>, the element is freed
and null is returned.
SV* av_delete(AV* ar, I32 key, I32 flags)
=for hackers
Found in file av.c
=item av_exists
X<av_exists>
Returns true if the element indexed by C<key> has been initialized.
This relies on the fact that uninitialized array elements are set to
C<&PL_sv_undef>.
bool av_exists(AV* ar, I32 key)
=for hackers
Found in file av.c
=item av_extend
X<av_extend>
Pre-extend an array. The C<key> is the index to which the array should be
extended.
void av_extend(AV* ar, I32 key)
=for hackers
Found in file av.c
=item av_fetch
X<av_fetch>
Returns the SV at the specified index in the array. The C<key> is the
index. If C<lval> is set then the fetch will be part of a store. Check
that the return value is non-null before dereferencing it to a C<SV*>.
See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
more information on how to use this function on tied arrays.
SV** av_fetch(AV* ar, I32 key, I32 lval)
=for hackers
Found in file av.c
=item av_fill
X<av_fill>
Set the highest index in the array to the given number, equivalent to
Perl's C<$#array = $fill;>.
The number of elements in the an array will be C<fill + 1> after
av_fill() returns. If the array was previously shorter then the
additional elements appended are set to C<PL_sv_undef>. If the array
was longer, then the excess elements are freed. C<av_fill(av, -1)> is
the same as C<av_clear(av)>.
void av_fill(AV* ar, I32 fill)
=for hackers
Found in file av.c
=item av_len
X<av_len>
Returns the highest index in the array. The number of elements in the
array is C<av_len(av) + 1>. Returns -1 if the array is empty.
I32 av_len(const AV* ar)
=for hackers
Found in file av.c
=item av_make
X<av_make>
Creates a new AV and populates it with a list of SVs. The SVs are copied
into the array, so they may be freed after the call to av_make. The new AV
will have a reference count of 1.
AV* av_make(I32 size, SV** svp)
=for hackers
Found in file av.c
=item av_pop
X<av_pop>
Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array
is empty.
SV* av_pop(AV* ar)
=for hackers
Found in file av.c
=item av_push
X<av_push>
Pushes an SV onto the end of the array. The array will grow automatically
to accommodate the addition.
void av_push(AV* ar, SV* val)
=for hackers
Found in file av.c
=item av_shift
X<av_shift>
Shifts an SV off the beginning of the array.
SV* av_shift(AV* ar)
=for hackers
Found in file av.c
=item av_store
X<av_store>
Stores an SV in an array. The array index is specified as C<key>. The
return value will be NULL if the operation failed or if the value did not
need to be actually stored within the array (as in the case of tied
arrays). Otherwise it can be dereferenced to get the original C<SV*>. Note
that the caller is responsible for suitably incrementing the reference
count of C<val> before the call, and decrementing it if the function
returned NULL.
See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
more information on how to use this function on tied arrays.
SV** av_store(AV* ar, I32 key, SV* val)
=for hackers
Found in file av.c
=item av_undef
X<av_undef>
Undefines the array. Frees the memory used by the array itself.
void av_undef(AV* ar)
=for hackers
Found in file av.c
=item av_unshift
X<av_unshift>
Unshift the given number of C<undef> values onto the beginning of the
array. The array will grow automatically to accommodate the addition. You
must then use C<av_store> to assign values to these new elements.
void av_unshift(AV* ar, I32 num)
=for hackers
Found in file av.c
=item get_av
X<get_av>
Returns the AV of the specified Perl array. If C<create> is set and the
Perl variable does not exist then it will be created. If C<create> is not
set and the variable does not exist then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
AV* get_av(const char* name, I32 create)
=for hackers
Found in file perl.c
=item newAV
X<newAV>
Creates a new AV. The reference count is set to 1.
AV* newAV()
=for hackers
Found in file av.c
=item sortsv
X<sortsv>
Sort an array. Here is an example:
sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale);
Currently this always uses mergesort. See sortsv_flags for a more
flexible routine.
void sortsv(SV** array, size_t num_elts, SVCOMPARE_t cmp)
=for hackers
Found in file pp_sort.c
=item sortsv_flags
X<sortsv_flags>
Sort an array, with various options.
void sortsv_flags(SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags)
=for hackers
Found in file pp_sort.c
=back
=head1 Callback Functions
=over 8
=item call_argv
X<call_argv>
Performs a callback to the specified Perl sub. See L<perlcall>.
NOTE: the perl_ form of this function is deprecated.
I32 call_argv(const char* sub_name, I32 flags, char** argv)
=for hackers
Found in file perl.c
=item call_method
X<call_method>
Performs a callback to the specified Perl method. The blessed object must
be on the stack. See L<perlcall>.
NOTE: the perl_ form of this function is deprecated.
I32 call_method(const char* methname, I32 flags)
=for hackers
Found in file perl.c
=item call_pv
X<call_pv>
Performs a callback to the specified Perl sub. See L<perlcall>.
NOTE: the perl_ form of this function is deprecated.
I32 call_pv(const char* sub_name, I32 flags)
=for hackers
Found in file perl.c
=item call_sv
X<call_sv>
Performs a callback to the Perl sub whose name is in the SV. See
L<perlcall>.
NOTE: the perl_ form of this function is deprecated.
I32 call_sv(SV* sv, I32 flags)
=for hackers
Found in file perl.c
=item ENTER
X<ENTER>
Opening bracket on a callback. See C<LEAVE> and L<perlcall>.
ENTER;
=for hackers
Found in file scope.h
=item eval_pv
X<eval_pv>
Tells Perl to C<eval> the given string and return an SV* result.
NOTE: the perl_ form of this function is deprecated.
SV* eval_pv(const char* p, I32 croak_on_error)
=for hackers
Found in file perl.c
=item eval_sv
X<eval_sv>
Tells Perl to C<eval> the string in the SV.
NOTE: the perl_ form of this function is deprecated.
I32 eval_sv(SV* sv, I32 flags)
=for hackers
Found in file perl.c
=item FREETMPS
X<FREETMPS>
Closing bracket for temporaries on a callback. See C<SAVETMPS> and
L<perlcall>.
FREETMPS;
=for hackers
Found in file scope.h
=item LEAVE
X<LEAVE>
Closing bracket on a callback. See C<ENTER> and L<perlcall>.
LEAVE;
=for hackers
Found in file scope.h
=item SAVETMPS
X<SAVETMPS>
Opening bracket for temporaries on a callback. See C<FREETMPS> and
L<perlcall>.
SAVETMPS;
=for hackers
Found in file scope.h
=back
=head1 Character classes
=over 8
=item isALNUM
X<isALNUM>
Returns a boolean indicating whether the C C<char> is an ASCII alphanumeric
character (including underscore) or digit.
bool isALNUM(char ch)
=for hackers
Found in file handy.h
=item isALPHA
X<isALPHA>
Returns a boolean indicating whether the C C<char> is an ASCII alphabetic
character.
bool isALPHA(char ch)
=for hackers
Found in file handy.h
=item isDIGIT
X<isDIGIT>
Returns a boolean indicating whether the C C<char> is an ASCII
digit.
bool isDIGIT(char ch)
=for hackers
Found in file handy.h
=item isLOWER
X<isLOWER>
Returns a boolean indicating whether the C C<char> is a lowercase
character.
bool isLOWER(char ch)
=for hackers
Found in file handy.h
=item isSPACE
X<isSPACE>
Returns a boolean indicating whether the C C<char> is whitespace.
bool isSPACE(char ch)
=for hackers
Found in file handy.h
=item isUPPER
X<isUPPER>
Returns a boolean indicating whether the C C<char> is an uppercase
character.
bool isUPPER(char ch)
=for hackers
Found in file handy.h
=item toLOWER
X<toLOWER>
Converts the specified character to lowercase.
char toLOWER(char ch)
=for hackers
Found in file handy.h
=item toUPPER
X<toUPPER>
Converts the specified character to uppercase.
char toUPPER(char ch)
=for hackers
Found in file handy.h
=back
=head1 Cloning an interpreter
=over 8
=item perl_clone
X<perl_clone>
Create and return a new interpreter by cloning the current one.
perl_clone takes these flags as parameters:
CLONEf_COPY_STACKS - is used to, well, copy the stacks also,
without it we only clone the data and zero the stacks,
with it we copy the stacks and the new perl interpreter is
ready to run at the exact same point as the previous one.
The pseudo-fork code uses COPY_STACKS while the
threads->create doesn't.
CLONEf_KEEP_PTR_TABLE
perl_clone keeps a ptr_table with the pointer of the old
variable as a key and the new variable as a value,
this allows it to check if something has been cloned and not
clone it again but rather just use the value and increase the
refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill
the ptr_table using the function
C<ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;>,
reason to keep it around is if you want to dup some of your own
variable who are outside the graph perl scans, example of this
code is in threads.xs create
CLONEf_CLONE_HOST
This is a win32 thing, it is ignored on unix, it tells perls
win32host code (which is c++) to clone itself, this is needed on
win32 if you want to run two threads at the same time,
if you just want to do some stuff in a separate perl interpreter
and then throw it away and return to the original one,
you don't need to do anything.
PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags)
=for hackers
Found in file sv.c
=back
=head1 CV Manipulation Functions
=over 8
=item CvSTASH
X<CvSTASH>
Returns the stash of the CV.
HV* CvSTASH(CV* cv)
=for hackers
Found in file cv.h
=item get_cv
X<get_cv>
Uses C<strlen> to get the length of C<name>, then calls C<get_cvn_flags>.
NOTE: the perl_ form of this function is deprecated.
CV* get_cv(const char* name, I32 flags)
=for hackers
Found in file perl.c
=item get_cvn_flags
X<get_cvn_flags>
Returns the CV of the specified Perl subroutine. C<flags> are passed to
C<gv_fetchpvn_flags>. If C<GV_ADD> is set and the Perl subroutine does not
exist then it will be declared (which has the same effect as saying
C<sub name;>). If C<GV_ADD> is not set and the subroutine does not exist
then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
CV* get_cvn_flags(const char* name, STRLEN len, I32 flags)
=for hackers
Found in file perl.c
=back
=head1 Embedding Functions
=over 8
=item cv_undef
X<cv_undef>
Clear out all the active components of a CV. This can happen either
by an explicit C<undef &foo>, or by the reference count going to zero.
In the former case, we keep the CvOUTSIDE pointer, so that any anonymous
children can still follow the full lexical scope chain.
void cv_undef(CV* cv)
=for hackers
Found in file op.c
=item load_module
X<load_module>
Loads the module whose name is pointed to by the string part of name.
Note that the actual module name, not its filename, should be given.
Eg, "Foo::Bar" instead of "Foo/Bar.pm". flags can be any of
PERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, or PERL_LOADMOD_IMPORT_OPS
(or 0 for no flags). ver, if specified, provides version semantics
similar to C<use Foo::Bar VERSION>. The optional trailing SV*
arguments can be used to specify arguments to the module's import()
method, similar to C<use Foo::Bar VERSION LIST>.
void load_module(U32 flags, SV* name, SV* ver, ...)
=for hackers
Found in file op.c
=item nothreadhook
X<nothreadhook>
Stub that provides thread hook for perl_destruct when there are
no threads.
int nothreadhook()
=for hackers
Found in file perl.c
=item perl_alloc
X<perl_alloc>
Allocates a new Perl interpreter. See L<perlembed>.
PerlInterpreter* perl_alloc()
=for hackers
Found in file perl.c
=item perl_construct
X<perl_construct>
Initializes a new Perl interpreter. See L<perlembed>.
void perl_construct(PerlInterpreter* interp)
=for hackers
Found in file perl.c
=item perl_destruct
X<perl_destruct>
Shuts down a Perl interpreter. See L<perlembed>.
int perl_destruct(PerlInterpreter* interp)
=for hackers
Found in file perl.c
=item perl_free
X<perl_free>
Releases a Perl interpreter. See L<perlembed>.
void perl_free(PerlInterpreter* interp)
=for hackers
Found in file perl.c
=item perl_parse
X<perl_parse>
Tells a Perl interpreter to parse a Perl script. See L<perlembed>.
int perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env)
=for hackers
Found in file perl.c
=item perl_run
X<perl_run>
Tells a Perl interpreter to run. See L<perlembed>.
int perl_run(PerlInterpreter* interp)
=for hackers
Found in file perl.c
=item require_pv
X<require_pv>
Tells Perl to C<require> the file named by the string argument. It is
analogous to the Perl code C<eval "require '$file'">. It's even
implemented that way; consider using load_module instead.
NOTE: the perl_ form of this function is deprecated.
void require_pv(const char* pv)
=for hackers
Found in file perl.c
=back
=head1 Functions in file dump.c
=over 8
=item pv_display
X<pv_display>
char *pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len,
STRLEN pvlim, U32 flags)
Similar to
pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);
except that an additional "\0" will be appended to the string when
len > cur and pv[cur] is "\0".
Note that the final string may be up to 7 chars longer than pvlim.
char* pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
=for hackers
Found in file dump.c
=item pv_escape
X<pv_escape>
|const STRLEN count|const STRLEN max
|STRLEN const *escaped, const U32 flags
Escapes at most the first "count" chars of pv and puts the results into
dsv such that the size of the escaped string will not exceed "max" chars
and will not contain any incomplete escape sequences.
If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the string
will also be escaped.
Normally the SV will be cleared before the escaped string is prepared,
but when PERL_PV_ESCAPE_NOCLEAR is set this will not occur.
If PERL_PV_ESCAPE_UNI is set then the input string is treated as Unicode,
if PERL_PV_ESCAPE_UNI_DETECT is set then the input string is scanned
using C<is_utf8_string()> to determine if it is Unicode.
If PERL_PV_ESCAPE_ALL is set then all input chars will be output
using C<\x01F1> style escapes, otherwise only chars above 255 will be
escaped using this style, other non printable chars will use octal or
common escaped patterns like C<\n>. If PERL_PV_ESCAPE_NOBACKSLASH
then all chars below 255 will be treated as printable and
will be output as literals.
If PERL_PV_ESCAPE_FIRSTCHAR is set then only the first char of the
string will be escaped, regardles of max. If the string is utf8 and
the chars value is >255 then it will be returned as a plain hex
sequence. Thus the output will either be a single char,
an octal escape sequence, a special escape like C<\n> or a 3 or
more digit hex value.
If PERL_PV_ESCAPE_RE is set then the escape char used will be a '%' and
not a '\\'. This is because regexes very often contain backslashed
sequences, whereas '%' is not a particularly common character in patterns.
Returns a pointer to the escaped text as held by dsv.
NOTE: the perl_ form of this function is deprecated.
char* pv_escape(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags)
=for hackers
Found in file dump.c
=item pv_pretty
X<pv_pretty>
|const STRLEN count|const STRLEN max\
|const char const *start_color| const char const *end_color\
|const U32 flags
Converts a string into something presentable, handling escaping via
pv_escape() and supporting quoting and ellipses.
If the PERL_PV_PRETTY_QUOTE flag is set then the result will be
double quoted with any double quotes in the string escaped. Otherwise
if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in
angle brackets.
If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in
string were output then an ellipsis C<...> will be appended to the
string. Note that this happens AFTER it has been quoted.
If start_color is non-null then it will be inserted after the opening
quote (if there is one) but before the escaped text. If end_color
is non-null then it will be inserted after the escaped text but before
any quotes or ellipses.
Returns a pointer to the prettified text as held by dsv.
NOTE: the perl_ form of this function is deprecated.
char* pv_pretty(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags)
=for hackers
Found in file dump.c
=back
=head1 Functions in file mathoms.c
=over 8
=item gv_fetchmethod
X<gv_fetchmethod>
See L<gv_fetchmethod_autoload>.
GV* gv_fetchmethod(HV* stash, const char* name)
=for hackers
Found in file mathoms.c
=item pack_cat
X<pack_cat>
The engine implementing pack() Perl function. Note: parameters next_in_list and
flags are not used. This call should not be used; use packlist instead.
void pack_cat(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
=for hackers
Found in file mathoms.c
=item sv_2pvbyte_nolen
X<sv_2pvbyte_nolen>
Return a pointer to the byte-encoded representation of the SV.
May cause the SV to be downgraded from UTF-8 as a side-effect.
Usually accessed via the C<SvPVbyte_nolen> macro.
char* sv_2pvbyte_nolen(SV* sv)
=for hackers
Found in file mathoms.c
=item sv_2pvutf8_nolen
X<sv_2pvutf8_nolen>
Return a pointer to the UTF-8-encoded representation of the SV.
May cause the SV to be upgraded to UTF-8 as a side-effect.
Usually accessed via the C<SvPVutf8_nolen> macro.
char* sv_2pvutf8_nolen(SV* sv)
=for hackers
Found in file mathoms.c
=item sv_2pv_nolen
X<sv_2pv_nolen>
Like C<sv_2pv()>, but doesn't return the length too. You should usually
use the macro wrapper C<SvPV_nolen(sv)> instead.
char* sv_2pv_nolen(SV* sv)
=for hackers
Found in file mathoms.c
=item sv_catpvn_mg
X<sv_catpvn_mg>
Like C<sv_catpvn>, but also handles 'set' magic.
void sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len)
=for hackers
Found in file mathoms.c
=item sv_catsv_mg
X<sv_catsv_mg>
Like C<sv_catsv>, but also handles 'set' magic.
void sv_catsv_mg(SV *dstr, SV *sstr)
=for hackers
Found in file mathoms.c
=item sv_force_normal