Test::...::Line(3pm)

πŸ“¦
version 0.87 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Test::BDD::Cucumber::Model::Line πŸ’–

okay so bestie, welcome to Test::BDD::Cucumber::Model::Line β€” the little model class that represents one single line inside a feature file. yes, just one line. she's small but she knows things πŸ’…


✨ VERSION ✨

this is version 0.87, periodt.


🌸 DESCRIPTION 🌸

Model to represent a line in a feature file. that's the whole vibe. one line, one object, no cap.


πŸŽ€ ATTRIBUTES πŸŽ€

these are the lil properties every Line object is carrying around with her 🫢

  • number β€” the line number this line represents. like, which line in the file she is. iconic.
  • document β€” the Test::BDD::Cucumber::Model::Document object this line belongs to. she's not alone, she's got a whole document supporting her πŸ’œ
  • raw_content β€” the content of the line, unmodified. exactly as it appeared, no edits, no glow-up, nothing. fr fr.

πŸ¦‹ METHODS πŸ¦‹

the things you can actually do with a Line. let's go 🧚

  • indent β€” returns the number of preceding spaces before content on a line. it's giving "how far in is she scooted" ✨
  • content β€” returns the line's content, with the indentation stripped. so like, the content but with her indentation taken off πŸŽ€
  • content_remove_indentation β€” accepts an int of number of spaces, and returns the content with exactly that many preceding spaces removed. exactly that many. not one more, not one less πŸ’€
  • debug_summary β€” returns a string with the filename and line number. great for when you're debugging and need receipts πŸ”₯
  • filename β€” returns either the filename, or the string "[String]" if the document was loaded from a string. so if there's no real file, she tells you "[String]", no cap.
  • is_blank
  • is_comment β€” Return true if the line is either blank, or is a comment.
lowkey important: is_blank and is_comment share that description β€” they return true if the line is either blank, or is a comment. so a blank line gets a βœ… from is_blank, and a comment gets a βœ… from is_comment. iykyk 😌

πŸ‘‘ AUTHOR πŸ‘‘

Peter Sergeant pete@clueball.com β€” the author, the legend, the main character who made this happen πŸ’–


🌈 LICENSE 🌈

Copyright 2019-2023, Erik Huelsmann
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl

so that's the legal tea, bestie β€” those copyrights are literally the whole thing, and it's licensed under the same terms as Perl 🫢


and that's the page! this was written against perl v5.40.1, dated 2025-05-29 β€” shoutout to that version and that date for making this lil manpage moment possible πŸ’…βœ¨ bye bestie, go write some slay feature files πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from